Fixed Cppcheck warning about possible null pointer dereference

This commit is contained in:
Daniel Marjamäki 2015-07-08 16:06:35 +02:00
parent 5a9328f26a
commit 0dd008e068
1 changed files with 1 additions and 1 deletions

View File

@ -2638,7 +2638,7 @@ void CheckOther::checkVarFuncNullUB()
if (f && f->argCount() <= argnr) { if (f && f->argCount() <= argnr) {
const Token *tok2 = f->argDef; const Token *tok2 = f->argDef;
tok2 = tok2 ? tok2->link() : nullptr; // goto ')' tok2 = tok2 ? tok2->link() : nullptr; // goto ')'
if (Token::simpleMatch(tok2->tokAt(-3), ". . .")) if (tok2 && Token::simpleMatch(tok2->tokAt(-3), ". . ."))
varFuncNullUBError(tok); varFuncNullUBError(tok);
} }
} }