forked from OSchip/llvm-project
Avoid a throw in case we init a lldb_private::Address with an invalid SectionSP.
llvm-svn: 151439
This commit is contained in:
parent
722cec2957
commit
2679f7e920
|
@ -131,9 +131,11 @@ public:
|
|||
/// The offset in bytes into \a section.
|
||||
//------------------------------------------------------------------
|
||||
Address (const lldb::SectionSP §ion_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;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue