diff --git a/lib/checkother.cpp b/lib/checkother.cpp index b6dbf6d28..367cc721f 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -2638,7 +2638,7 @@ void CheckOther::checkVarFuncNullUB() if (f && f->argCount() <= argnr) { const Token *tok2 = f->argDef; tok2 = tok2 ? tok2->link() : nullptr; // goto ')' - if (Token::simpleMatch(tok2->tokAt(-3), ". . .")) + if (tok2 && Token::simpleMatch(tok2->tokAt(-3), ". . .")) varFuncNullUBError(tok); } }