From 3b18fbd983052d53019d8f7dc26660f16651363a Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Sat, 7 Jul 2012 01:07:33 +0000 Subject: [PATCH] Fixed a crasher that happens if we try to inspect a NULL symbol file. llvm-svn: 159882 --- .../Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp index 57a061f6127c..78adaf441b51 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp @@ -280,6 +280,9 @@ SymbolFileDWARFDebugMap::GetSymbolFileByCompUnitInfo (CompileUnitInfo *comp_unit // it will have the remapped sections that we do below. SymbolFileDWARF *oso_symfile = (SymbolFileDWARF *)comp_unit_info->oso_symbol_vendor->GetSymbolFile(); + if (!oso_symfile) + return NULL; + if (oso_symfile->GetNumCompileUnits() != 1) { oso_symfile->GetObjectFile()->GetModule()->ReportError ("DWARF for object file '%s' contains multiple translation units!",