Avoid a throw in case we init a lldb_private::Address with an invalid SectionSP.

llvm-svn: 151439
This commit is contained in:
Greg Clayton 2012-02-25 07:09:11 +00:00
parent 722cec2957
commit 2679f7e920
1 changed files with 3 additions and 1 deletions

View File

@ -131,9 +131,11 @@ public:
/// The offset in bytes into \a section.
//------------------------------------------------------------------
Address (const lldb::SectionSP &section_sp, lldb::addr_t offset) :
m_section_wp (section_sp),
m_section_wp (), // Don't init with section_sp in case section_sp is invalid (the weak_ptr will throw)
m_offset (offset)
{
if (section_sp)
m_section_wp = section_sp;
}
//------------------------------------------------------------------