summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-04-11 18:05:09 +0200
committerEike Rathke <erack@redhat.com>2017-04-11 19:06:36 +0200
commit024ddbc7d2ffe6b4b84c48b213296a0716086b6d (patch)
treea5b26418ad98015de811010b1f7a15b1ed60110d /sc/source/core
parente777618a59b6a66207d416b7b4dd3e77c2662260 (diff)
reset variables when not owner
Change-Id: Ieab4bf36b89abac2d2ff377fc2b6f31ce0e1d3aa
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/postit.cxx11
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)