diff options
Diffstat (limited to '3rdparty/python-console/modified/pyinterpreter.cc')
-rw-r--r-- | 3rdparty/python-console/modified/pyinterpreter.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/3rdparty/python-console/modified/pyinterpreter.cc b/3rdparty/python-console/modified/pyinterpreter.cc index 958049b9..cbb6322f 100644 --- a/3rdparty/python-console/modified/pyinterpreter.cc +++ b/3rdparty/python-console/modified/pyinterpreter.cc @@ -94,7 +94,11 @@ const std::list<std::string> &pyinterpreter_suggest(const std::string &hint) PyObject *py_result; PyObject *dum; py_result = Py_CompileString(command.c_str(), "<stdin>", Py_single_input); + if (py_result == nullptr) + break; dum = PyEval_EvalCode(py_result, glb, loc); + if (dum == nullptr) + break; Py_XDECREF(dum); Py_XDECREF(py_result); res = redirector_take_output(m_threadState); |