diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-04-15 16:09:09 +0100 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2020-04-16 07:20:14 +0200 |
commit | dafa1bbf09e1df38cc0758b9f4c8a0ca186b31d2 (patch) | |
tree | 8dd270f2d8ea79b2252a0f768f8000b0a1b167dd /sfx2 | |
parent | 2dfd8f48d11b05243b9b4b315be94f86e09480df (diff) |
tdf#126828 don't crash fetching cmis properties from disposed SfxBaseModel
Change-Id: Ie064632667b40201e0d266c64e3068c4d1983c7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92283
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit db677c854a37031235b0f42b4f4f48560149754f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92289
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index a136f74f2886..9849ac86d642 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2458,8 +2458,10 @@ void SAL_CALL SfxBaseModel::notifyDocumentEvent( const OUString&, const Referenc throw lang::NoSupportException("SfxBaseModel controls all the sent notifications itself!" ); } -Sequence< document::CmisProperty > SAL_CALL SfxBaseModel::getCmisProperties() +Sequence<document::CmisProperty> SAL_CALL SfxBaseModel::getCmisProperties() { + if (impl_isDisposed()) + return Sequence<document::CmisProperty>(); return m_pData->m_cmisProperties; } @@ -2597,7 +2599,9 @@ void SAL_CALL SfxBaseModel::checkIn( sal_Bool bIsMajor, const OUString& rMessage uno::Sequence< document::CmisVersion > SAL_CALL SfxBaseModel::getAllVersions( ) { - uno::Sequence< document::CmisVersion > aVersions; + uno::Sequence<document::CmisVersion> aVersions; + if (impl_isDisposed()) + return aVersions; SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium(); if ( pMedium ) { |