Guard against NULL derefs.
clang static analyzer fixits. llvm-svn: 219889
This commit is contained in:
parent
d31c800ce0
commit
60db6e43ca
|
@ -2990,7 +2990,7 @@ SymbolFileDWARF::ResolveSymbolContext(const FileSpec& file_spec, uint32_t line,
|
|||
|
||||
if (block_die != NULL)
|
||||
sc.block = block.FindBlockByID (MakeUserID(block_die->GetOffset()));
|
||||
else
|
||||
else if (function_die != NULL)
|
||||
sc.block = block.FindBlockByID (MakeUserID(function_die->GetOffset()));
|
||||
}
|
||||
}
|
||||
|
@ -3402,7 +3402,7 @@ SymbolFileDWARF::ResolveFunction (DWARFCompileUnit *cu,
|
|||
break;
|
||||
}
|
||||
}
|
||||
assert (die->Tag() == DW_TAG_subprogram);
|
||||
assert (die && die->Tag() == DW_TAG_subprogram);
|
||||
if (GetFunction (cu, die, sc))
|
||||
{
|
||||
Address addr;
|
||||
|
@ -7114,7 +7114,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
|
|||
{
|
||||
symbol_context_scope = sc.comp_unit;
|
||||
}
|
||||
else if (sc.function != NULL)
|
||||
else if (sc.function != NULL && sc_parent_die)
|
||||
{
|
||||
symbol_context_scope = sc.function->GetBlock(true).FindBlockByID(MakeUserID(sc_parent_die->GetOffset()));
|
||||
if (symbol_context_scope == NULL)
|
||||
|
|
Loading…
Reference in New Issue