Fixed #9693 (Bug hunting: Segmentation fault with --bug-hunting and clangimport.cpp)

This commit is contained in:
Daniel Marjamäki 2020-04-25 10:13:18 +02:00
parent 04bd2bdb74
commit 39710f106c
1 changed files with 2 additions and 0 deletions

View File

@ -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"))