Kaydet (Commit) a10f2e24 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Andras Timar

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: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 715fcaff)
Reviewed-on: https://gerrit.libreoffice.org/57809Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
(cherry picked from commit d4052d2c)
üst 8899714b
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment