[lldb] Replace condition that always evaluates to false (#89685)
Addresses issue #87243. The current code incorrectly checks the validity of ```obj``` twice when it should be checking the new ```str_obj``` pointer. Signed-off-by: Troy-Butler <squintik@outlook.com> Co-authored-by: Troy-Butler <squintik@outlook.com>
This commit is contained in:
@@ -61,7 +61,7 @@ Expected<std::string> python::As<std::string>(Expected<PythonObject> &&obj) {
|
||||
if (!obj)
|
||||
return obj.takeError();
|
||||
PyObject *str_obj = PyObject_Str(obj.get().get());
|
||||
if (!obj)
|
||||
if (!str_obj)
|
||||
return llvm::make_error<PythonException>();
|
||||
auto str = Take<PythonString>(str_obj);
|
||||
auto utf8 = str.AsUTF8();
|
||||
|
||||
Reference in New Issue
Block a user