diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-26 10:29:43 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-30 11:26:04 +0100 |
commit | 9e7344ae5776117e94684713767fae1b0afbb6b9 (patch) | |
tree | e3dc0a2f6d876863191a4a315a0f467a3fd00aac | |
parent | 697359f63e392a73fe3c34635819706a93e5c6b1 (diff) |
tdf#115221 crash in printing and comment
not wonderfully happy with this fix, because we're changing the delete
ordering here, but the origin of this bug was
commit a754294ac7a902fe96fbbd6b8b6824a360d6b248
use rtl::Reference in SwDocFac instead of manual acquire/releas
and
commit cc483d0470dbf0d01e4da818b148ff0b851c5187 (patch)
tdf#112292 - fix memory leak and use more auto ref counting in sw
so the delete ordering was obviously messed up in those already, and we
have such a morass of callbacks here, I can't see where else to fix it.
I tried to add a couple more "getDoc() != nullptr" checks, but we still
ended up crashing with an SwViewShell that had a bad pLayoutAccess
pointer.
Change-Id: I4aa39d58ae25bed41e3fd2c32c6d53659012ec10
Reviewed-on: https://gerrit.libreoffice.org/48658
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit de9bcd167b059e00818304626c0cadaa330738a4)
Reviewed-on: https://gerrit.libreoffice.org/48748
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | sw/source/core/view/vnew.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx index 2998ffb131f8..4c74acecdd09 100644 --- a/sw/source/core/view/vnew.cxx +++ b/sw/source/core/view/vnew.cxx @@ -324,9 +324,7 @@ SwViewShell::~SwViewShell() if ( mxDoc.get() ) { - auto x = mxDoc->getReferenceCount(); - mxDoc.clear(); - if( x > 1 ) + if( mxDoc->getReferenceCount() > 1 ) GetLayout()->ResetNewLayout(); } |