[Libreoffice-commits] core.git: sfx2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Jul 21 00:59:41 UTC 2018


 sfx2/source/doc/objxtor.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 715fcaff01ed048c52c69264a7a0fb773dd57b32
Author:     Markus Mohrhard <markus.mohrhard at googlemail.com>
AuthorDate: Sat Jul 21 01:57:27 2018 +0200
Commit:     Markus Mohrhard <markus.mohrhard at googlemail.com>
CommitDate: Sat Jul 21 02:59:18 2018 +0200

    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 at googlemail.com>

diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 82e376f9f0ac..f5fab3249fc0 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -312,13 +312,13 @@ SfxObjectShell::~SfxObjectShell()
     DELETEZ( 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 );


More information about the Libreoffice-commits mailing list