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

Caolán McNamara caolanm at redhat.com
Wed May 16 19:58:38 UTC 2018


 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 <caolanm at 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 <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at 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 );
 };
 


More information about the Libreoffice-commits mailing list