Add a defensive check for nullptr as in the block above.

Unfortunately I had to work backwards from a crash log,
so I don't have a good testcase at this point in time.

rdar://problem/51874647

llvm-svn: 364344
This commit is contained in:
Adrian Prantl 2019-06-25 19:50:12 +00:00
parent 7803eac24f
commit 510f4098ae

View File

@ -280,7 +280,7 @@ CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(
}
// Case 4 or 5
if (!symbol->GetName().GetStringRef().startswith("vtable for")) {
if (symbol && !symbol->GetName().GetStringRef().startswith("vtable for")) {
optional_info.callable_case =
LibCppStdFunctionCallableCase::FreeOrMemberFunction;
optional_info.callable_address = function_address_resolved;