summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Interpreter/ScriptInterpreterPython.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
index d0858739b12..b069bf46a3d 100644
--- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
@@ -2555,9 +2555,10 @@ ScriptInterpreterPython::GetDocumentationForItem(const char* item, std::string&
if (ExecuteOneLineWithReturn (command.c_str(),
ScriptInterpreter::eScriptReturnTypeCharStrOrNone,
- &result_ptr, false) && result_ptr)
+ &result_ptr, false))
{
- dest.assign(result_ptr);
+ if (result_ptr)
+ dest.assign(result_ptr);
return true;
}
else
OpenPOWER on IntegriCloud