From 6ca76ff9659a197842778c806d4d4331f785d533 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Wed, 3 Aug 2016 18:44:15 +0300 Subject: [PATCH] Fix potential null pointer dereference This was CID 1360399 --- test/testsymboldatabase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/testsymboldatabase.cpp b/test/testsymboldatabase.cpp index e9d28dd43..41785dc56 100644 --- a/test/testsymboldatabase.cpp +++ b/test/testsymboldatabase.cpp @@ -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); }