[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Tue Mar 14 18:59:42 UTC 2017
sc/source/core/data/postit.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 409a7799ba06f3c6b9965f2f35169283a948bc30
Author: Eike Rathke <erack at redhat.com>
Date: Tue Mar 14 19:57:04 2017 +0100
no assert for one reference while destroying the Undo document
Change-Id: Idf9e0b2600d503ff50cd6269e8d528c0fad12a3e
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 3addea4..2c96466 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -1106,8 +1106,9 @@ void ScPostIt::RemoveCaption()
}
}
// Either the caption object is gone or, because of Undo or clipboard is
- // held in at least two instances.
- assert(!maNoteData.mxCaption || maNoteData.mxCaption.getRefs() >= 2);
+ // held in at least two instances, or the Undo document is just destroyed
+ // which leaves us with one reference.
+ assert(!maNoteData.mxCaption || maNoteData.mxCaption.getRefs() >= 2 || (mrDoc.IsUndo() && mrDoc.IsInDtorClear()));
maNoteData.mxCaption.reset(nullptr);
}
More information about the Libreoffice-commits
mailing list