Fixed crash when running cppcheck on itself introduced in previous commit

This commit is contained in:
PKEuS 2013-02-15 11:17:14 -08:00
parent 44887df04f
commit 7b3493322d
1 changed files with 1 additions and 1 deletions

View File

@ -720,7 +720,7 @@ void CheckOther::checkRedundantAssignment()
else if (Token::Match(tok2, "%var% (") && nonLocal(tok->variable())) { // Called function might use the variable
const Function* func = symbolDatabase->findFunction(tok2);
const Variable* var = tok->variable();
if (!var || var->isGlobal() || var->isReference() || ((!func || func->functionScope->functionOf) && tok2->strAt(-1) != ".")) // Global variable, or member function
if (!var || var->isGlobal() || var->isReference() || ((!func || !func->functionScope || func->functionScope->functionOf) && tok2->strAt(-1) != ".")) // Global variable, or member function
error = false;
}
}