diff options
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, 3 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index cf20f6fa742..6a8b0b065c2 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -37,6 +37,8 @@ #include "bpy_rna.h" #include "bpy_app_handlers.h" +#include "../generic/python_utildefines.h" + #include "BPY_extern.h" void bpy_app_generic_callback(struct Main *main, struct ID *id, void *arg); @@ -306,8 +308,7 @@ void bpy_app_generic_callback(struct Main *UNUSED(main), struct ID *id, void *ar PyTuple_SET_ITEM(args, 0, pyrna_struct_CreatePyObject(&id_ptr)); } else { - PyTuple_SET_ITEM(args, 0, Py_None); - Py_INCREF(Py_None); + PyTuple_SET_ITEM(args, 0, Py_INCREF_RET(Py_None)); } /* Iterate the list and run the callbacks |