Fixes the case where we created a dummy target, deleted it, and then tried to evaluate an expression with no target.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157110 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBTarget.cpp b/source/API/SBTarget.cpp
index 1ec6397..d1275e6 100644
--- a/source/API/SBTarget.cpp
+++ b/source/API/SBTarget.cpp
@@ -502,7 +502,7 @@
bool
SBTarget::IsValid () const
{
- return m_opaque_sp.get() != NULL;
+ return m_opaque_sp.get() != NULL && m_opaque_sp->IsValid();
}
SBProcess