From 81513b43468d8f04c3dd7bd4b86877c59da144ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 10 Jan 2014 05:54:03 +0100 Subject: [PATCH] value flow: Readded safety check that tok->astOperand1() is not NULL --- lib/valueflow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index b0d8aebb6..c0fc0c105 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -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();