From 28eb57114d05dd100d9b4a56e0a00be85cd09e3b Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Fri, 12 Oct 2012 17:34:26 +0000 Subject: Bunch of cleanups for warnings found by the llvm static analyzer. llvm-svn: 165808 --- lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp') diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp index ef53eb55121..ff65d08e5fc 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationList.cpp @@ -34,11 +34,12 @@ DWARFLocationList::Dump(Stream &s, const DWARFCompileUnit* cu, const DataExtract s.PutCString("\n "); s.Indent(); - s.AddressRange (start_addr + base_addr, - end_addr + base_addr, - cu->GetAddressByteSize(), - NULL, - ": "); + if (cu) + s.AddressRange (start_addr + base_addr, + end_addr + base_addr, + cu->GetAddressByteSize(), + NULL, + ": "); uint32_t loc_length = debug_loc_data.GetU16(&offset); DataExtractor locationData(debug_loc_data, offset, loc_length); -- cgit v1.2.3