Kaydet (Commit) 95de10e0 authored tarafından Eike Rathke's avatar Eike Rathke

narrow the assert condition further down

Change-Id: Ia9b1db652b2f15b66b89b51038d16fb0da6ffb6d
üst ca24976b
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment