mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Fix refcounting issue with python frame objects
This commit is contained in:
@@ -1247,6 +1247,9 @@ PyObject *PythonContext::outstream_write(PyObject *self, PyObject *args)
|
||||
if(context == NULL)
|
||||
{
|
||||
PyFrameObject *frame = PyEval_GetFrame();
|
||||
// inc reference count here so all frames can be decref'd whether they come from here or
|
||||
// PyFrame_GetBack
|
||||
Py_XINCREF(frame);
|
||||
|
||||
while(frame)
|
||||
{
|
||||
@@ -1366,6 +1369,9 @@ extern "C" PyObject *GetCurrentGlobalHandle()
|
||||
// module the globals may not have the entry, but the root level is expected to.
|
||||
{
|
||||
PyFrameObject *frame = PyEval_GetFrame();
|
||||
// inc reference count here so all frames can be decref'd whether they come from here or
|
||||
// PyFrame_GetBack
|
||||
Py_XINCREF(frame);
|
||||
|
||||
while(frame)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user