From eacb4911a02806b55657e6249cf81ff258e10e65 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Thu, 20 Sep 2012 23:23:55 +0000 Subject: 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 --- lldb/source/Interpreter/ScriptInterpreterPython.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lldb/source/Interpreter/ScriptInterpreterPython.cpp') 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 -- cgit v1.2.3