Avoid null pointer dereference

This commit is contained in:
Paul 2020-06-25 17:23:42 -05:00
parent 720d882b69
commit 263a0364cc
1 changed files with 1 additions and 1 deletions

View File

@ -1227,7 +1227,7 @@ const Token * getTokenArgumentFunction(const Token * tok, int& argn)
} }
const Token* argtok = tok; const Token* argtok = tok;
while(!Token::Match(argtok->astParent(), ",|(|{") || (argtok->astParent() && argtok->astParent()->isCast())) { while(argtok->astParent() && (!Token::Match(argtok->astParent(), ",|(|{") || argtok->astParent()->isCast())) {
argtok = argtok->astParent(); argtok = argtok->astParent();
} }
if (!argtok) if (!argtok)