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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Aug 16 15:57:11 UTC 2018


 svx/source/unodraw/unoshape.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 4f2b25c406b3e63b5d15bf90ad29abb3eb9041a1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 16 13:31:30 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Aug 16 17:56:48 2018 +0200

    tdf#114427 improve fix, wedo need to free it regardless
    
    Change-Id: I7c35bcd839d7b7b2e8a9ce83f732e14b68ca58eb
    Reviewed-on: https://gerrit.libreoffice.org/59172
    Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index aea443acb6fa..a61ce3fbc79d 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1357,11 +1357,13 @@ void SAL_CALL SvxShape::dispose()
     mpImpl->maDisposeListeners.disposeAndClear(aEvt);
     mpImpl->maPropertyNotifier.disposing();
 
-    bool bFreeSdrObject = false;
     if ( HasSdrObject() )
     {
         SdrObject* pObject = GetSdrObject();
+
         EndListening( pObject->getSdrModelFromSdrObject() );
+        bool bFreeSdrObject = false;
+
         if ( pObject->IsInserted() && pObject->getSdrPageFromSdrObject() )
         {
             OSL_ENSURE( HasSdrObjectOwnership(), "SvxShape::dispose: is the below code correct?" );
@@ -1381,11 +1383,6 @@ void SAL_CALL SvxShape::dispose()
                 }
             }
         }
-    }
-
-    if ( HasSdrObject() ) //tdf#114427 refetch SdrObject in light of RemoveObject
-    {
-        SdrObject* pObject = GetSdrObject();
 
         pObject->setUnoShape(nullptr);
 


More information about the Libreoffice-commits mailing list