summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBDebugger.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-12-23 00:53:45 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-12-23 00:53:45 +0000
commit3f0b90dcd0b4296d58eaaa2c94a00281ce2a0a70 (patch)
treec94c511215de4814798e63127ee12e02e588f736 /lldb/source/API/SBDebugger.cpp
parentf74c2348b74a7d69d672d4559e5b17bfda56453c (diff)
downloadbcm5719-llvm-3f0b90dcd0b4296d58eaaa2c94a00281ce2a0a70.tar.gz
bcm5719-llvm-3f0b90dcd0b4296d58eaaa2c94a00281ce2a0a70.zip
rdar://problem/10216227
LLDB (python bindings) Crashing in lldb::SBDebugger::DeleteTarget(lldb::SBTarget&) Need to check the validity of (SBTarget&)target passed to SBDebugger::DeleteTarget() before calling target->Destroy(). llvm-svn: 147213
Diffstat (limited to 'lldb/source/API/SBDebugger.cpp')
-rw-r--r--lldb/source/API/SBDebugger.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index 65357bb76ad..ce72631ce65 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -616,7 +616,7 @@ bool
SBDebugger::DeleteTarget (lldb::SBTarget &target)
{
bool result = false;
- if (m_opaque_sp)
+ if (m_opaque_sp && target.IsValid())
{
// No need to lock, the target list is thread safe
result = m_opaque_sp->GetTargetList().DeleteTarget (target.m_opaque_sp);
OpenPOWER on IntegriCloud