Fixed Cppcheck warning, possible null pointer dereference of tok.

This commit is contained in:
Daniel Marjamäki 2014-10-18 10:59:48 +02:00
parent a2f669eff7
commit 0a1a34b9b7
1 changed files with 1 additions and 1 deletions

View File

@ -2242,7 +2242,7 @@ static bool isWithoutSideEffects(const Tokenizer *tokenizer, const Token* tok)
while (tok && tok->astOperand2() && tok->astOperand2()->str() != "(")
tok = tok->astOperand2();
if (tok->varId()) {
if (tok && tok->varId()) {
const Variable* var = tok->variable();
return var && (!var->isClass() || var->isPointer() || var->isStlType());
}