Attempt to fix crashs when self-checking cppcheck introduced by previous commit

This commit is contained in:
PKEuS 2014-09-01 14:12:22 +02:00
parent 40e5dab9dc
commit 0995b85c09
1 changed files with 1 additions and 1 deletions

View File

@ -611,7 +611,7 @@ const char * CheckMemoryLeakInFunction::call_func(const Token *tok, std::list<co
return nullptr;
// Function is not noreturn
if (tok->function()) {
if (tok->function() && tok->function()->functionScope) {
std::string temp;
if (!_settings->library.isScopeNoReturn(tok->function()->functionScope->classEnd, &temp) && temp.empty())
return nullptr;