summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2012-09-20 23:23:55 +0000
committerEnrico Granata <egranata@apple.com>2012-09-20 23:23:55 +0000
commiteacb4911a02806b55657e6249cf81ff258e10e65 (patch)
tree4c1698a9061e274961f15fa00091810cd295ef75
parent2cb5e527f697d0cf93bb3dd8ffa319ca33d19c40 (diff)
downloadbcm5719-llvm-eacb4911a02806b55657e6249cf81ff258e10e65.tar.gz
bcm5719-llvm-eacb4911a02806b55657e6249cf81ff258e10e65.zip
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
llvm-svn: 164334
-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