Fix null dereference if address is NULL.

llvm-svn: 201026
This commit is contained in:
Jean-Daniel Dupas 2014-02-08 20:22:05 +00:00
parent fa0f72837f
commit ef37711f85
1 changed files with 1 additions and 3 deletions

View File

@ -5918,9 +5918,7 @@ Process::ResolveIndirectFunction(const Address *address, Error &error)
{
if (address == nullptr)
{
Symbol *symbol = address->CalculateSymbolContextSymbol();
error.SetErrorStringWithFormat("unable to determine direct function call for indirect function %s",
symbol ? symbol->GetName().AsCString() : "<UNKNOWN>");
error.SetErrorString("Invalid address argument");
return LLDB_INVALID_ADDRESS;
}