diff options
-rw-r--r-- | starmath/source/cursor.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index 191ffc2faa1b..c29d009b34fd 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -933,7 +933,9 @@ void SmCursor::InsertFraction() { //Find Parent and offset in parent SmStructureNode *pLineParent = pLine->GetParent(); int nParentIndex = pLineParent->IndexOfSubNode(pLine); - OSL_ENSURE(nParentIndex != -1, "pLine must be a subnode of pLineParent!"); + assert(nParentIndex != -1); //pLine must be a subnode of pLineParent! + if (nParentIndex == -1) + return; //We begin modifying the tree here BeginEdit(); |