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()
// If a twig can be converted, True will be returned. In this case
// the result is in the left twig.
void SbiExprNode::FoldConstants()
{
if( IsOperand() || eTok == LIKE ) return;
if( pLeft )
pLeft->FoldConstants();
if( pRight )
if (pLeft && pRight)
{
pRight->FoldConstants();
if( pLeft->IsConstant() && pRight->IsConstant()
......@@ -419,7 +418,7 @@ void SbiExprNode::FoldConstants()
}
}
}
else if( pLeft && pLeft->IsNumber() )
else if (pLeft && pLeft->IsNumber())
{
nVal = pLeft->nVal;
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