sd/qa/unit/data/ppt/pass/ofz7469-leak-1.ppt |binary svx/source/unodraw/unoshape.cxx | 3 +++ 2 files changed, 3 insertions(+)
New commits: commit 59ef304cff3b363fdcbf8bc56762c9349de78d24 Author: Caolán McNamara <caol...@redhat.com> Date: Tue May 15 12:34:49 2018 +0100 ofz#7469 leak of SdrObject owned by SvxShape SvxShape::InvalidateSdrObject is called and mpSdrObjectWeakReference is reset. HasSdrObjectOwnership is only true if HasSdrObject is true and HasSdrObject is true only if mpSdrObjectWeakReference is set. So if mpSdrObjectWeakReference is reset in Invalidate when HasSdrObjectOwnership is true, the shape becomes inconsistent Change-Id: I0031c0dac33923367a2f73fcb8fe2eeb88a08db9 Reviewed-on: https://gerrit.libreoffice.org/54368 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sd/qa/unit/data/ppt/pass/ofz7469-leak-1.ppt b/sd/qa/unit/data/ppt/pass/ofz7469-leak-1.ppt new file mode 100644 index 000000000000..d52f795e6dde Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/ofz7469-leak-1.ppt differ diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 33299173e71e..1ea93dde6d34 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -247,6 +247,9 @@ void SvxShape::InvalidateSdrObject() EndListening(GetSdrObject()->getSdrModelFromSdrObject()); } + if (HasSdrObjectOwnership()) + return; + mpSdrObjectWeakReference.reset( nullptr ); }; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits