Fix potential null deref; after SymbolContextSpecifier::SymbolContextMatches

has tested that sc.function is null, it would try to deref sc.function.
It should be calling sc.symbol here.

llvm-svn: 251583
This commit is contained in:
Jason Molenda 2015-10-28 23:49:55 +00:00
parent 7d0e34eb33
commit 8fe108766f
1 changed files with 1 additions and 1 deletions

View File

@ -1089,7 +1089,7 @@ SymbolContextSpecifier::SymbolContextMatches(SymbolContext &sc)
}
else if (sc.symbol != nullptr)
{
if (!sc.symbol->GetMangled().NameMatches(func_name, sc.function->GetLanguage()))
if (!sc.symbol->GetMangled().NameMatches(func_name, sc.symbol->GetLanguage()))
return false;
}
}