summaryrefslogtreecommitdiff
path: root/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp')
-rw-r--r--tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp b/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
index 6e76c23036f1..9a173d1007e2 100644
--- a/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
+++ b/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
@@ -871,7 +871,10 @@ lldb::SBListener &CMICmnLLDBDebugSessionInfo::GetListener() const {
// Throws: None.
//--
lldb::SBTarget CMICmnLLDBDebugSessionInfo::GetTarget() const {
- return GetDebugger().GetSelectedTarget();
+ auto target = GetDebugger().GetSelectedTarget();
+ if (target.IsValid())
+ return target;
+ return GetDebugger().GetDummyTarget();
}
//++