Fixing a logic error where we would incorrectly show the newly crafted function not found error for a Python function in some cases where the function actually existed and had an empty docstring
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164334 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/ScriptInterpreterPython.cpp b/source/Interpreter/ScriptInterpreterPython.cpp
index d085873..b069bf4 100644
--- a/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/source/Interpreter/ScriptInterpreterPython.cpp
@@ -2555,9 +2555,10 @@
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