diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 711409960..9146e3919 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -2235,6 +2235,8 @@ void CheckOther::nullConstantDereference() tok = tok->link(); tok = tok->next(); } + if (!tok) + break; } else if (Token::simpleMatch(tok, "* 0"))