aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/API/SBCommandInterpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBCommandInterpreter.cpp')
-rw-r--r--lldb/source/API/SBCommandInterpreter.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp
index 9ea7200..396c0ee 100644
--- a/lldb/source/API/SBCommandInterpreter.cpp
+++ b/lldb/source/API/SBCommandInterpreter.cpp
@@ -155,11 +155,12 @@ bool SBCommandInterpreter::InterruptCommand() {
const char *SBCommandInterpreter::GetIOHandlerControlSequence(char ch) {
LLDB_INSTRUMENT_VA(this, ch);
- return (IsValid()
- ? m_opaque_ptr->GetDebugger()
- .GetTopIOHandlerControlSequence(ch)
- .GetCString()
- : nullptr);
+ if (!IsValid())
+ return nullptr;
+
+ return ConstString(
+ m_opaque_ptr->GetDebugger().GetTopIOHandlerControlSequence(ch))
+ .GetCString();
}
lldb::ReturnStatus