Avoid null pointer dereference
This commit is contained in:
parent
720d882b69
commit
263a0364cc
|
@ -1227,7 +1227,7 @@ const Token * getTokenArgumentFunction(const Token * tok, int& argn)
|
|||
}
|
||||
|
||||
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();
|
||||
}
|
||||
if (!argtok)
|
||||
|
|
Loading…
Reference in New Issue