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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 15 16:07:36 UTC 2020


 sfx2/source/doc/sfxbasemodel.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit db677c854a37031235b0f42b4f4f48560149754f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 15 16:09:09 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Apr 15 18:06:56 2020 +0200

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

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


More information about the Libreoffice-commits mailing list