value flow: Readded safety check that tok->astOperand1() is not NULL

This commit is contained in:
Daniel Marjamäki 2014-01-10 05:54:03 +01:00
parent d085705e8f
commit 81513b4346
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ static void valueFlowBeforeCondition(TokenList *tokenlist, ErrorLogger *errorLog
unsigned int varid;
MathLib::bigint num;
const Variable *var;
if (tok->isComparisonOp() && tok->astOperand2()) {
if (tok->isComparisonOp() && tok->astOperand1() && tok->astOperand2()) {
if (tok->astOperand1()->isName() && tok->astOperand2()->isNumber()) {
varid = tok->astOperand1()->varId();
var = tok->astOperand1()->variable();