diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-16 13:31:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-16 17:56:48 +0200 |
commit | 4f2b25c406b3e63b5d15bf90ad29abb3eb9041a1 (patch) | |
tree | c4453326a3e0faa989cba58834365ecf18b0bcad /svx/source | |
parent | 00faf6dd9957890634db94cfc6b8a1108a62a2d2 (diff) |
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@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
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); |