Fixed an issue that happens in LLDB versions after SBFrame switched to using a lldb::ExecutionContextRefSP where we might segfault due to using a shared pointer with NULL in it. The SBFrame object should always have a valid lldb::ExecutionContextRefSP in it. The SBFrame::Clear() method was doing the wrong thing and is now fixed.

llvm-svn: 154614
This commit is contained in:
Greg Clayton
2012-04-12 20:58:26 +00:00
parent f9e36cccb5
commit af2589ea09

View File

@@ -86,7 +86,9 @@ SBFrame::~SBFrame()
StackFrameSP
SBFrame::GetFrameSP() const
{
return m_opaque_sp->GetFrameSP();
if (m_opaque_sp)
return m_opaque_sp->GetFrameSP();
return StackFrameSP();
}
void
@@ -497,7 +499,7 @@ SBFrame::GetPCAddress () const
void
SBFrame::Clear()
{
m_opaque_sp.reset();
m_opaque_sp->Clear();
}
lldb::SBValue