summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/source/cursor.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index f3eff790fd0c..7748db97edcf 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -809,7 +809,10 @@ bool SmCursor::InsertRow() {
//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 false;
//Discover the context of this command
SmTableNode *pTable = NULL;