- fix for python refcounting crashes, remember PyDict_GetItem and PyDict_GetItemString borrow a ref.
- the namespace dictionary wasn't being de-allocated for each run. - clear every error after printing it to avoid stale PyObjects hanging about.
This commit is contained in:
@@ -344,7 +344,7 @@ static PyObject *Method_registerKey( PyObject * self, PyObject * args )
|
||||
static bContext *get_py_context__internal(void)
|
||||
{
|
||||
PyObject *globals = PyEval_GetGlobals();
|
||||
PyObject *val= PyDict_GetItemString(globals, "__bpy_context__");
|
||||
PyObject *val= PyDict_GetItemString(globals, "__bpy_context__"); /* borrow ref */
|
||||
return PyCObject_AsVoidPtr(val);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user