Make the code a bit more robust

This commit is contained in:
Daniel Marjamäki 2019-07-29 20:56:59 +02:00
parent ba97e3844f
commit 3ad9d6a1ad
1 changed files with 3 additions and 0 deletions

View File

@ -1552,6 +1552,9 @@ struct FwdAnalysis::Result FwdAnalysis::checkRecursive(const Token *expr, const
bodyStart = conditionStart->link()->next();
}
if (!bodyStart || !conditionStart)
return Result(Result::Type::BAILOUT);
// Is expr changed in condition?
if (!isUnchanged(conditionStart, conditionStart->link(), exprVarIds, local))
return Result(Result::Type::BAILOUT);