diff options
| author | Greg Clayton <gclayton@apple.com> | 2012-04-12 20:58:26 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2012-04-12 20:58:26 +0000 |
| commit | af2589ea092cead8a9b614ad411852b7e47e1066 (patch) | |
| tree | 0bbdd4077a87f0493626839384e7f2596ffa7612 /lldb/source/API | |
| parent | f9e36cccb591098214d09ff0bfb88618c61101d9 (diff) | |
| download | bcm5719-llvm-af2589ea092cead8a9b614ad411852b7e47e1066.tar.gz bcm5719-llvm-af2589ea092cead8a9b614ad411852b7e47e1066.zip | |
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
Diffstat (limited to 'lldb/source/API')
| -rw-r--r-- | lldb/source/API/SBFrame.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp index 1b44b753ea5..42c522dfe5a 100644 --- a/lldb/source/API/SBFrame.cpp +++ b/lldb/source/API/SBFrame.cpp @@ -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 |

