Verification; Avoid crash
This commit is contained in:
parent
49ed1a82b4
commit
ab2e87191f
|
@ -1433,6 +1433,8 @@ static void execute(const Token *start, const Token *end, Data &data)
|
||||||
}
|
}
|
||||||
if (!Token::Match(tok2->astOperand1(), "%var%"))
|
if (!Token::Match(tok2->astOperand1(), "%var%"))
|
||||||
throw VerifyException(tok2, "Unhandled assignment in loop");
|
throw VerifyException(tok2, "Unhandled assignment in loop");
|
||||||
|
if (!tok2->astOperand1()->variable())
|
||||||
|
throw VerifyException(tok2, "Unhandled assignment in loop");
|
||||||
// give variable "any" value
|
// give variable "any" value
|
||||||
int varid = tok2->astOperand1()->varId();
|
int varid = tok2->astOperand1()->varId();
|
||||||
if (changedVariables.find(varid) != changedVariables.end())
|
if (changedVariables.find(varid) != changedVariables.end())
|
||||||
|
|
Loading…
Reference in New Issue