diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-26 06:33:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-26 06:33:57 +0400 |
commit | 491526e5ed31bdba3e0a16e0ad6b8b59afb2f8d3 (patch) | |
tree | d4781092ff3dfc55caff8cbc631e01675f0d3598 /source/blender/python/intern | |
parent | 951c1798ab54b32d3be204a0ae48144dc116f536 (diff) |
add null check, crashes py 3.3 which isn't released but adding the check is harmless
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index eb7362ff8c7..9b42335dfe5 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -6376,10 +6376,14 @@ static int pyrna_deferred_register_props(StructRNA *srna, PyObject *class_dict) if ((order= PyDict_GetItem(class_dict, bpy_intern_str_order)) && PyList_CheckExact(order)) { for (pos= 0; pos<PyList_GET_SIZE(order); pos++) { key= PyList_GET_ITEM(order, pos); - item= PyDict_GetItem(class_dict, key); - ret= deferred_register_prop(srna, key, item); - if (ret != 0) - break; + /* however unlikely its possible + * fails in py 3.3 beta with __qualname__ */ + if ((item= PyDict_GetItem(class_dict, key))) { + ret= deferred_register_prop(srna, key, item); + if (ret != 0) { + break; + } + } } } else { |