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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-26 02:37:05 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-26 02:37:05 +0400
commit2223ca1c20cf480ca77365ff3593066c655de9fa (patch)
treec0f23461f37d4df4bfa2df8c818fc8fe9a99bb0c /source/blender/python/intern/bpy_props.c
parenta4eacfa867abb74720391ec6ac5dc4612de3a4fa (diff)
Fix #32973: crash adding python property with update=None parameter passed.
Diffstat (limited to 'source/blender/python/intern/bpy_props.c')
-rw-r--r--source/blender/python/intern/bpy_props.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index 6d9e4364066..39a05389b63 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -260,7 +260,7 @@ static int bpy_prop_callback_check(PyObject *py_func, int argcount)
static int bpy_prop_callback_assign(struct PropertyRNA *prop, PyObject *update_cb)
{
/* assume this is already checked for type and arg length */
- if (update_cb) {
+ if (update_cb && update_cb != Py_None) {
PyObject **py_data = MEM_callocN(sizeof(PyObject *) * BPY_DATA_CB_SLOT_SIZE, __func__);
RNA_def_property_update_runtime(prop, (void *)bpy_prop_update_cb);
py_data[BPY_DATA_CB_SLOT_UPDATE] = update_cb;