Check for null compile unit so we don't crash.

llvm-svn: 246887
This commit is contained in:
Greg Clayton 2015-09-04 22:29:46 +00:00
parent 1b348a68e5
commit ea4a5bb8bb
1 changed files with 3 additions and 0 deletions

View File

@ -845,6 +845,9 @@ SymbolFileDWARF::DebugInfo() const
DWARFCompileUnit*
SymbolFileDWARF::GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit)
{
if (!comp_unit)
return nullptr;
DWARFDebugInfo* info = DebugInfo();
if (info)
{