Fix potential null pointer dereference

This was CID 1360399
This commit is contained in:
Dmitry-Me 2016-08-03 18:44:15 +03:00
parent 7f30108f1d
commit 6ca76ff965
1 changed files with 1 additions and 0 deletions

View File

@ -2279,6 +2279,7 @@ private:
ASSERT_EQUALS(true, db && f && f->function() && f->function()->tokenDef->linenr() == 3 && f->function()->token->linenr() == 9);
f = Token::findsimplematch(tokenizer.tokens(), "~ MyClass ( ) ;");
ASSERT(f != nullptr);
f = f->next();
ASSERT_EQUALS(true, db && f && f->function() && f->function()->tokenDef->linenr() == 4 && f->function()->token->linenr() == 8);
}