CheckExceptionSafety: Fixed crash when a function is missing function scope

This commit is contained in:
Daniel Marjamäki 2014-04-21 08:01:01 +02:00
parent 6ff5de2118
commit 0ced16d17a
1 changed files with 3 additions and 0 deletions

View File

@ -184,6 +184,9 @@ static const Token * functionThrowsRecursive(const Function * function, std::set
if (recursive.find(function) != recursive.end())
return nullptr;
if (!function->functionScope)
return nullptr;
for (const Token *tok = function->functionScope->classStart->next();
tok != function->functionScope->classEnd; tok = tok->next()) {
if (tok->str() == "try") {