[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Mon Apr 10 16:55:22 UTC 2017
sc/source/core/data/postit.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 95de10e0b02cece37ffe2428112773b6e096a221
Author: Eike Rathke <erack at redhat.com>
Date: Mon Apr 10 18:54:17 2017 +0200
narrow the assert condition further down
Change-Id: Ia9b1db652b2f15b66b89b51038d16fb0da6ffb6d
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 9bd602bfb72e..2acc07a09939 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -1097,10 +1097,11 @@ void ScPostIt::RemoveCaption()
}
// Either the caption object is gone or, because of Undo or clipboard is
// 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.
+ // original sheet in this document is just deleted, or the Undo document is
+ // just destroyed which leaves us with one reference.
// Let's detect other use cases..
- assert(!maNoteData.mxCaption || maNoteData.mxCaption.getRefs() >= 2 || !mrDoc.IsUndo() || mrDoc.IsInDtorClear());
+ assert(!maNoteData.mxCaption || maNoteData.mxCaption.getRefs() >= 2 ||
+ (!mrDoc.IsUndo() && !mrDoc.IsClipboard()) || (mrDoc.IsUndo() && mrDoc.IsInDtorClear()));
maNoteData.mxCaption.reset(nullptr);
}
More information about the Libreoffice-commits
mailing list