Work in progress for:
rdar://problem/10577182
Audit lldb API impl for places where we need to perform a NULL check
Add NULL checks for SBModule and SBSection APIs.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146899 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBSection.cpp b/source/API/SBSection.cpp
index bdcf422..ed6dba7 100644
--- a/source/API/SBSection.cpp
+++ b/source/API/SBSection.cpp
@@ -142,7 +142,7 @@
SBSection::FindSubSection (const char *sect_name)
{
lldb::SBSection sb_section;
- if (IsValid())
+ if (sect_name && IsValid())
{
ConstString const_sect_name(sect_name);
sb_section.SetSection(m_opaque_ap->GetSection()->GetChildren ().FindSectionByName(const_sect_name).get());