coverity#736099 Improper use of negative value
Change-Id: I065a8074fcafba123898c70eded464aa108e2e9e
This commit is contained in:
parent
84c4838feb
commit
46c95fa740
1 changed files with 5 additions and 0 deletions
|
@ -302,6 +302,11 @@ void SmCursor::InsertNodes(SmNodeList* pNewNodes){
|
|||
SmStructureNode* pLineParent = pLine->GetParent();
|
||||
int nParentIndex = pLineParent->IndexOfSubNode(pLine);
|
||||
OSL_ENSURE(nParentIndex != -1, "pLine must be a subnode of pLineParent!");
|
||||
if (nParentIndex == -1)
|
||||
{
|
||||
delete pNewNodes;
|
||||
return;
|
||||
}
|
||||
|
||||
//Convert line to list
|
||||
SmNodeList* pLineList = NodeToList(pLine);
|
||||
|
|
Loading…
Reference in a new issue