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/Target/Target.cpp b/source/Target/Target.cpp
index a1caed4..5fe1f5e 100644
--- a/source/Target/Target.cpp
+++ b/source/Target/Target.cpp
@@ -64,6 +64,7 @@
m_internal_breakpoint_list (true),
m_watchpoint_list (),
m_process_sp (),
+ m_valid (true),
m_search_filter_sp (),
m_image_search_paths (ImageSearchPathsChanged, this),
m_scratch_ast_context_ap (NULL),
@@ -165,6 +166,7 @@
Target::Destroy()
{
Mutex::Locker locker (m_mutex);
+ m_valid = false;
DeleteCurrentProcess ();
m_platform_sp.reset();
m_arch.Clear();