Fixed cppcheck warning

This commit is contained in:
Daniel Marjamäki 2014-01-12 21:19:20 +01:00
parent c9e9262682
commit f6c7be91a9
1 changed files with 2 additions and 0 deletions

View File

@ -779,6 +779,8 @@ void CheckNullPointer::nullPointerByDeRefAndChec()
ftok = ftok->link();
ftok = ftok->previous();
}
if (!ftok || !ftok->previous())
continue;
std::list<const Token *> varlist;
parseFunctionCall(*ftok->previous(), varlist, &_settings->library, 0);
if (std::find(varlist.begin(), varlist.end(), tok) != varlist.end()) {