Fix potential null pointer dereference
This was CID 1360399
This commit is contained in:
parent
7f30108f1d
commit
6ca76ff965
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue