diff options
author | Eike Rathke <erack@redhat.com> | 2017-04-11 18:05:09 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-04-11 19:06:36 +0200 |
commit | 024ddbc7d2ffe6b4b84c48b213296a0716086b6d (patch) | |
tree | a5b26418ad98015de811010b1f7a15b1ed60110d /sc/source/core | |
parent | e777618a59b6a66207d416b7b4dd3e77c2662260 (diff) |
reset variables when not owner
Change-Id: Ieab4bf36b89abac2d2ff377fc2b6f31ce0e1d3aa
Diffstat (limited to 'sc/source/core')
-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 78cd43a6a5c2..ef15c8556762 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) |