Kaydet (Commit) bec28033 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#704558 Dereference after null check

Change-Id: I6fe44d8926acd185bb6bc671fb7df8ae935998c1
üst dc4d6c59
...@@ -240,13 +240,12 @@ void SbiExprNode::CollectBits() ...@@ -240,13 +240,12 @@ void SbiExprNode::CollectBits()
// If a twig can be converted, True will be returned. In this case // If a twig can be converted, True will be returned. In this case
// the result is in the left twig. // the result is in the left twig.
void SbiExprNode::FoldConstants() void SbiExprNode::FoldConstants()
{ {
if( IsOperand() || eTok == LIKE ) return; if( IsOperand() || eTok == LIKE ) return;
if( pLeft ) if( pLeft )
pLeft->FoldConstants(); pLeft->FoldConstants();
if( pRight ) if (pLeft && pRight)
{ {
pRight->FoldConstants(); pRight->FoldConstants();
if( pLeft->IsConstant() && pRight->IsConstant() if( pLeft->IsConstant() && pRight->IsConstant()
...@@ -419,7 +418,7 @@ void SbiExprNode::FoldConstants() ...@@ -419,7 +418,7 @@ void SbiExprNode::FoldConstants()
} }
} }
} }
else if( pLeft && pLeft->IsNumber() ) else if (pLeft && pLeft->IsNumber())
{ {
nVal = pLeft->nVal; nVal = pLeft->nVal;
delete pLeft; delete pLeft;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment