diff options
author | Eike Rathke <erack@redhat.com> | 2017-04-11 18:05:09 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-05-15 21:59:08 +0200 |
commit | 5c1566503cbf3310bca6cf4c121cc421ec8d5808 (patch) | |
tree | 58db2a4d48f82c7b17f57d2b2f3b08abc3eb70e0 /sc | |
parent | 9f18a9dd14561eb54fdbab098bea9d79b6307baa (diff) |
reset variables when not owner
Change-Id: Ieab4bf36b89abac2d2ff377fc2b6f31ce0e1d3aa
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/postit.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 87b03142fb18..c6a91d25bec0 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -695,9 +695,16 @@ void ScCaptionPtr::decRefAndDestroy() #if 1 // FIXME: there are still cases where the caption pointer is dangling mpCaption = nullptr; + mbNotOwner = false; #else - // Destroying Draw Undo deletes its SdrObject, don't attempt that twice. - if (!mbNotOwner) + // Destroying Draw Undo and some other delete the SdrObject, don't + // attempt that twice. + if (mbNotOwner) + { + mpCaption = nullptr; + mbNotOwner = false; + } + else { removeFromDrawPageAndFree( true ); // ignoring Undo if (mpCaption) |