mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Set 'pyrenderdoc' global after extension registration. Closes #1291
This commit is contained in:
@@ -604,12 +604,20 @@ bool PythonContext::LoadExtension(ICaptureContext &ctx, const rdcstr &extension)
|
||||
qCritical() << "Internal error passing pyrenderdoc to extension register()";
|
||||
}
|
||||
|
||||
Py_XDECREF(pyctx);
|
||||
|
||||
if(retval == NULL)
|
||||
ext = NULL;
|
||||
|
||||
Py_XDECREF(retval);
|
||||
|
||||
if(ext)
|
||||
{
|
||||
int ret = PyModule_AddObject(ext, "pyrenderdoc", pyctx);
|
||||
|
||||
if(ret != 0)
|
||||
ext = NULL;
|
||||
}
|
||||
|
||||
Py_XDECREF(pyctx);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user