diff options
-rw-r--r-- | basic/source/comp/exprnode.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx index e245fef19382..4340848bf66e 100644 --- a/basic/source/comp/exprnode.cxx +++ b/basic/source/comp/exprnode.cxx @@ -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; |