<rdar://problem/11620586>
Fixed an issue where warning logs were causing a crash.
llvm-svn: 161013
diff --git a/lldb/source/Target/SectionLoadList.cpp b/lldb/source/Target/SectionLoadList.cpp
index ecff040..27ed75e 100644
--- a/lldb/source/Target/SectionLoadList.cpp
+++ b/lldb/source/Target/SectionLoadList.cpp
@@ -109,12 +109,16 @@
ModuleSP module_sp (section->GetModule());
if (module_sp)
{
- module_sp->ReportWarning ("address 0x%16.16llx maps to more than one section: %s.%s and %s.%s",
- load_addr,
- module_sp->GetFileSpec().GetFilename().GetCString(),
- section->GetName().GetCString(),
- ats_pos->second->GetModule()->GetFileSpec().GetFilename().GetCString(),
- ats_pos->second->GetName().GetCString());
+ ModuleSP curr_module_sp (ats_pos->second->GetModule());
+ if (curr_module_sp)
+ {
+ module_sp->ReportWarning ("address 0x%16.16llx maps to more than one section: %s.%s and %s.%s",
+ load_addr,
+ module_sp->GetFileSpec().GetFilename().GetCString(),
+ section->GetName().GetCString(),
+ curr_module_sp->GetFileSpec().GetFilename().GetCString(),
+ ats_pos->second->GetName().GetCString());
+ }
}
}
ats_pos->second = section;