diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-11 18:39:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-11 21:05:55 +0100 |
commit | ed75dbb1ca64a06840c5c3d1ecbfeb6362350fde (patch) | |
tree | 54ebda4876c989a04ee807d260781068666e4485 /starmath | |
parent | 70ba0a8d4e8ba959c5eef4f025b85306a7153fd0 (diff) |
coverity#736100 Improper use of negative value
Change-Id: Ia5cf36b64841f2d465c922da40008a540cc6caf7
Diffstat (limited to 'starmath')
-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(); |