[Lldb-commits] [lldb] r246887 - Check for null compile unit so we don't crash.

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 4 15:29:46 PDT 2015


Author: gclayton
Date: Fri Sep  4 17:29:46 2015
New Revision: 246887

URL: http://llvm.org/viewvc/llvm-project?rev=246887&view=rev
Log:
Check for null compile unit so we don't crash.


Modified:
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=246887&r1=246886&r2=246887&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri Sep  4 17:29:46 2015
@@ -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)
     {




More information about the lldb-commits mailing list