Kaydet (Commit) 59ef304c authored tarafından Caolán McNamara's avatar Caolán McNamara

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/54368Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 8eaf3400
......@@ -247,6 +247,9 @@ void SvxShape::InvalidateSdrObject()
EndListening(GetSdrObject()->getSdrModelFromSdrObject());
}
if (HasSdrObjectOwnership())
return;
mpSdrObjectWeakReference.reset( nullptr );
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment