mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Fix error messages not being printed from async python callbacks
This commit is contained in:
@@ -1293,7 +1293,18 @@ extern "C" PyThreadState *GetExecutingThreadState(PyObject *global_handle)
|
||||
|
||||
extern "C" PyObject *GetCurrentGlobalHandle()
|
||||
{
|
||||
return current_global_handle;
|
||||
if(current_global_handle)
|
||||
return current_global_handle;
|
||||
|
||||
PyObject *sys = PyImport_ImportModule("sys");
|
||||
if(sys)
|
||||
{
|
||||
PyObject *ret = PyObject_GetAttrString(sys, "stdout");
|
||||
Py_XDECREF(sys);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
extern "C" void HandleException(PyObject *global_handle)
|
||||
|
||||
Reference in New Issue
Block a user