summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-04-07 16:58:13 +0200
committerEike Rathke <erack@redhat.com>2017-04-07 16:59:14 +0200
commite4364376b32c58edc0eaba4c587abe7de0eb9987 (patch)
tree71c049fb5fdfb3683dc6d54426ce4cbfa0e88c43 /sc
parenteff08429ea22fc6f09e6364aa51ba4f484889cb9 (diff)
yet another mxCaption refs==1 case to exclude from assert
Change-Id: Iffa8f2bc7d0bb77d5145a569da2c03aefbb9de4a
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/postit.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 1bb1f89e506d..9568148077d0 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -1103,9 +1103,11 @@ void ScPostIt::RemoveCaption()
}
}
// Either the caption object is gone or, because of Undo or clipboard is
- // held in at least two instances, or the Undo document is just destroyed
+ // held in at least two instances, or only one instance in Undo because the
+ // original sheet was deleted, or the Undo document is just destroyed
// which leaves us with one reference.
- assert(!maNoteData.mxCaption || maNoteData.mxCaption.getRefs() >= 2 || (mrDoc.IsUndo() && mrDoc.IsInDtorClear()));
+ // Let's detect other use cases..
+ assert(!maNoteData.mxCaption || maNoteData.mxCaption.getRefs() >= 2 || !mrDoc.IsUndo() || mrDoc.IsInDtorClear());
maNoteData.mxCaption.reset(nullptr);
}