diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-14 12:36:27 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-14 12:36:27 +0400 |
commit | de724a258eda45d1fed2b2176006c3b2df8abea2 (patch) | |
tree | a472a24defdce561a27ed0b8780dbce91c279d05 /source/blender/python/intern/bpy_app_handlers.c | |
parent | a4ba73311b4c2d862145f86ca078216b7ecbb56f (diff) | |
parent | c08e7e1dc0366c485dbea5ef1209f2cdb616fbb3 (diff) |
Merge branch 'master' into texture_nodes_refactor
Diffstat (limited to 'source/blender/python/intern/bpy_app_handlers.c')
-rw-r--r-- | source/blender/python/intern/bpy_app_handlers.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index 41ca2d49ed6..44da322efc0 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -240,8 +240,11 @@ PyObject *BPY_app_handlers_struct(void) void BPY_app_handlers_reset(const short do_all) { + PyGILState_STATE gilstate; int pos = 0; + gilstate = PyGILState_Ensure(); + if (do_all) { for (pos = 0; pos < BLI_CB_EVT_TOT; pos++) { /* clear list */ @@ -279,6 +282,8 @@ void BPY_app_handlers_reset(const short do_all) Py_DECREF(perm_id_str); } + + PyGILState_Release(gilstate); } /* the actual callback - not necessarily called from py */ |