From 8ead23fc91339729d553e6368fbe9142e0892ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 2 Jun 2010 18:06:37 +0200 Subject: [PATCH] CheckOther::nullConstantDereference: Fixed cppcheck warning message - tok may become null --- lib/checkother.cpp | 2 ++ 1 file changed, 2 insertions(+) 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"))