summaryrefslogtreecommitdiffstats
path: root/sfx2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-07-21 01:57:27 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2018-07-26 21:23:51 +0200
commitf30122f0ecde6cd1551dfea962327bd3454a239d (patch)
treecdbaf395d6961479fe23dbaf3ae39817905a7b7f /sfx2
parenttdf#118579 ignore body in body instead of flagging as an error (diff)
downloadcore-f30122f0ecde6cd1551dfea962327bd3454a239d.tar.gz
core-f30122f0ecde6cd1551dfea962327bd3454a239d.zip
fix shutdown crash when SfxApplication has already been destroyed
See e.g. http://crashreport.libreoffice.org/stats/crash_details/dc1ae6ff-923e-44f6-99a9-84893039efd7 Change-Id: I3b5a24bfb62977ca922bf3bececb6676691bf6ea Reviewed-on: https://gerrit.libreoffice.org/57789 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 715fcaff01ed048c52c69264a7a0fb773dd57b32) Reviewed-on: https://gerrit.libreoffice.org/57809 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit d4052d2ca523cc000132620aaecb59c14c17e20d) Reviewed-on: https://gerrit.libreoffice.org/57988 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objxtor.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 959666dfcc74..e1a130c7fc79 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -314,13 +314,13 @@ SfxObjectShell::~SfxObjectShell()
DELETEX(AutoReloadTimer_Impl, pImpl->pReloadTimer );
SfxApplication *pSfxApp = SfxGetpApp();
- if ( USHRT_MAX != pImpl->nVisualDocumentNumber )
+ if ( USHRT_MAX != pImpl->nVisualDocumentNumber && pSfxApp )
pSfxApp->ReleaseIndex(pImpl->nVisualDocumentNumber);
// Destroy Basic-Manager
pImpl->aBasicManager.reset( nullptr );
- if ( pSfxApp->GetDdeService() )
+ if ( pSfxApp && pSfxApp->GetDdeService() )
pSfxApp->RemoveDdeTopic( this );
pImpl->pBaseModel.set( nullptr );