Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-09-11 16:52:07 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-09-11 16:53:36 +0300
commit4665a0887341a38606b7354ce9b29cf0c6cdb6aa (patch)
tree203e7d303e7e1891ee8ada728d12cbebe9bec347
parentfc16cf8d2de489c63ace54d7da8ddd92b853b3d7 (diff)
Python: Fix to support old-style handlers
Can not re-use single typle even if there is a single input pointer: the all-arguments-typle consists of 2 elements.
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index e6a8febbf29..2fbefe3be74 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -333,9 +333,6 @@ void bpy_app_generic_callback(struct Main *UNUSED(main),
if (num_pointers == 0) {
PyTuple_SET_ITEM(args_single, 0, Py_INCREF_RET(Py_None));
}
- else if (num_pointers == 1) {
- args_single = args_all;
- }
else {
PyTuple_SET_ITEM(args_single, 0, pyrna_struct_CreatePyObject(pointers[0]));
}
@@ -362,9 +359,7 @@ void bpy_app_generic_callback(struct Main *UNUSED(main),
}
Py_DECREF(args_all);
- if (args_single != args_all) {
- Py_DECREF(args_single);
- }
+ Py_DECREF(args_single);
PyGILState_Release(gilstate);
}