diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-11 18:38:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-11 21:05:55 +0100 |
commit | 70ba0a8d4e8ba959c5eef4f025b85306a7153fd0 (patch) | |
tree | 1505e0f97efa0e11e08ac566b52c9d76c49bb68f /starmath | |
parent | 08fad277a07bb3cd7873ccd4f4f64ec6dae21e9f (diff) |
coverity#736101 Improper use of negative value
Change-Id: I6fec141e19de921128365da7cbd17e0a0bc0b9a9
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 7748db97edcf..191ffc2faa1b 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -263,7 +263,9 @@ void SmCursor::Delete(){ SmStructureNode* pLineParent = pLine->GetParent(); //Find line offset in parent int nLineOffset = pLineParent->IndexOfSubNode(pLine); - OSL_ENSURE(nLineOffset != -1, "pLine must be a child of its parent!"); + assert(nLineOffset != -1); //pLine must be a child of its parent! + if (nLineOffset == -1) + return; //Position after delete SmCaretPos PosAfterDelete; |