summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/cursor.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index daf16dd454e0..9a45577ce77d 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -676,6 +676,8 @@ void SmCursor::InsertBrackets(SmBracketType eBracketType) {
SmStructureNode *pLineParent = pLine->GetParent();
int nParentIndex = pLineParent->IndexOfSubNode(pLine);
OSL_ENSURE( nParentIndex != -1, "pLine must be a subnode of pLineParent!");
+ if (nParentIndex < 0)
+ return;
//Convert line to list
SmNodeList *pLineList = NodeToList(pLine);