From 18116ab61ee731a127d2fc06dd4ce8d8f8ca191d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 15 May 2013 16:40:50 +0200 Subject: [PATCH] CheckAssert: Fixed 'NULL pointer check and dereference code' --- lib/checkassert.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkassert.cpp b/lib/checkassert.cpp index 26069a071..d3b3e5e08 100644 --- a/lib/checkassert.cpp +++ b/lib/checkassert.cpp @@ -66,7 +66,7 @@ void CheckAssert::assertWithSideEffects() if (!scope) continue; for (const Token *tok2 = scope->classStart; tok2 != scope->classEnd; tok2 = tok2->next()) { - if (tok2 && tok2->type() != Token::eAssignmentOp && tok2->type() != Token::eIncDecOp) continue; + if (tok2->type() != Token::eAssignmentOp && tok2->type() != Token::eIncDecOp) continue; const Variable* var = tok2->previous()->variable(); if (!var) continue;