Set 'pyrenderdoc' global after extension registration. Closes #1291

This commit is contained in:
baldurk
2019-03-01 08:32:35 +00:00
parent ac37a592cc
commit 72d3c0ee3e
+10 -2
View File
@@ -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
{