fix null pointer dereference found by clang++ --analyze

This commit is contained in:
Robert Reif 2011-03-08 20:14:46 -05:00
parent 0b8581e717
commit c457179ce6
1 changed files with 1 additions and 1 deletions

View File

@ -920,7 +920,7 @@ void SymbolDatabase::addFunction(Scope **scope, const Token **tok, const Token *
if (func->hasBody)
{
addNewFunction(scope, tok);
if (scope)
if (*scope)
{
(*scope)->functionOf = scope1;
added = true;