diff --git a/lib/exprengine.cpp b/lib/exprengine.cpp index bb8b5b220..ffacc96ef 100644 --- a/lib/exprengine.cpp +++ b/lib/exprengine.cpp @@ -1491,6 +1491,8 @@ static void execute(const Token *start, const Token *end, Data &data) while (scope->type == Scope::eIf || scope->type == Scope::eElse) scope = scope->nestedIn; tok = scope->bodyEnd; + if (!precedes(tok,end)) + return; } if (Token::simpleMatch(tok, "try"))