Commit: b0d61ea77089adc1722ee0e23e4be323c4d6899c
Author: Julian Eisel
Date: Tue Dec 19 20:53:19 2017 +0100
Branches: master
https://developer.blender.org/rBb0d61ea77089adc1722ee0e23e4be323c4d6899c
Fix crash in RNA when accessing empty property_tags list
E.g. running `bpy.context.active_object.cycles.bl_rna.property` in the
console would crash.
Thanks @lijenstina for reporting!
===================================================================
M source/blender/makesrna/intern/rna_rna.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_rna.c
b/source/blender/makesrna/intern/rna_rna.c
index 507262675b3..6cd748c0026 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -335,7 +335,7 @@ static void
rna_Struct_property_tags_begin(CollectionPropertyIterator *iter, Poi
/* here ptr->data should always be the same as iter->parent.type */
StructRNA *srna = (StructRNA *)ptr->data;
const EnumPropertyItem *tag_defines =
RNA_struct_property_tag_defines(srna);
- unsigned int tag_count = RNA_enum_items_count(tag_defines);
+ unsigned int tag_count = tag_defines ?
RNA_enum_items_count(tag_defines) : 0;
rna_iterator_array_begin(iter, (void *)tag_defines,
sizeof(EnumPropertyItem), tag_count, 0, NULL);
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs