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>
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 5868deb..36ec8cb 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2460,8 +2460,10 @@
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;
}
@@ -2599,7 +2601,9 @@
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 )
{