value flow: Readded safety check that tok->astOperand1() is not NULL
This commit is contained in:
parent
d085705e8f
commit
81513b4346
|
@ -50,7 +50,7 @@ static void valueFlowBeforeCondition(TokenList *tokenlist, ErrorLogger *errorLog
|
||||||
unsigned int varid;
|
unsigned int varid;
|
||||||
MathLib::bigint num;
|
MathLib::bigint num;
|
||||||
const Variable *var;
|
const Variable *var;
|
||||||
if (tok->isComparisonOp() && tok->astOperand2()) {
|
if (tok->isComparisonOp() && tok->astOperand1() && tok->astOperand2()) {
|
||||||
if (tok->astOperand1()->isName() && tok->astOperand2()->isNumber()) {
|
if (tok->astOperand1()->isName() && tok->astOperand2()->isNumber()) {
|
||||||
varid = tok->astOperand1()->varId();
|
varid = tok->astOperand1()->varId();
|
||||||
var = tok->astOperand1()->variable();
|
var = tok->astOperand1()->variable();
|
||||||
|
|
Loading…
Reference in New Issue