Kaydet (Commit) 715fcaff authored tarafından Markus Mohrhard's avatar Markus Mohrhard

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>
üst bab37647
...@@ -312,13 +312,13 @@ SfxObjectShell::~SfxObjectShell() ...@@ -312,13 +312,13 @@ SfxObjectShell::~SfxObjectShell()
DELETEZ( pImpl->pReloadTimer ); DELETEZ( pImpl->pReloadTimer );
SfxApplication *pSfxApp = SfxGetpApp(); SfxApplication *pSfxApp = SfxGetpApp();
if ( USHRT_MAX != pImpl->nVisualDocumentNumber ) if ( USHRT_MAX != pImpl->nVisualDocumentNumber && pSfxApp )
pSfxApp->ReleaseIndex(pImpl->nVisualDocumentNumber); pSfxApp->ReleaseIndex(pImpl->nVisualDocumentNumber);
// Destroy Basic-Manager // Destroy Basic-Manager
pImpl->aBasicManager.reset( nullptr ); pImpl->aBasicManager.reset( nullptr );
if ( pSfxApp->GetDdeService() ) if ( pSfxApp && pSfxApp->GetDdeService() )
pSfxApp->RemoveDdeTopic( this ); pSfxApp->RemoveDdeTopic( this );
pImpl->pBaseModel.set( nullptr ); 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