Fixed #2590 (segmentation fault of cppcheck ( {}int ))

This commit is contained in:
Daniel Marjamäki 2011-02-19 09:56:17 +01:00
parent 7e5d8e42d4
commit 85b1ea21cf
1 changed files with 1 additions and 1 deletions

View File

@ -321,7 +321,7 @@ void CheckOther::checkSelfAssignment()
std::set<unsigned int> pod;
for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next())
{
if (tok->isStandardType() && tok->next()->varId() && Token::Match(tok->tokAt(2), "[,);]"))
if (tok->isStandardType() && Token::Match(tok->tokAt(2), "[,);]") && tok->next()->varId())
pod.insert(tok->next()->varId());
}