[Bf-blender-cvs] [601835cd313] master: Fix (unreported) crash when accessing some bl_rna.properties.

Bastien Montagne noreply at git.blender.org
Tue Apr 3 14:32:31 CEST 2018


Commit: 601835cd3130e4a1a039ed7d30ab9e38e9c4db5f
Author: Bastien Montagne
Date:   Tue Apr 3 14:30:36 2018 +0200
Branches: master
https://developer.blender.org/rB601835cd3130e4a1a039ed7d30ab9e38e9c4db5f

Fix (unreported) crash when accessing some bl_rna.properties.

E.g. typing `bpy.data.bl_rna.properties[8].<tab>` in console would hard-crash
trying to dereference NULL pointer. Was a missing check in rna_Property_tags_itemf().

===================================================================

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 6cd748c0026..b1b7965286f 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -629,7 +629,7 @@ static const EnumPropertyItem *rna_Property_tags_itemf(
 	int totitem = 0;
 
 	for (const EnumPropertyItem *struct_tags = RNA_struct_property_tag_defines(srna);
-	     struct_tags->identifier;
+	     struct_tags != NULL && struct_tags->identifier != NULL;
 	     struct_tags++)
 	{
 		memcpy(&tmp, struct_tags, sizeof(tmp));



More information about the Bf-blender-cvs mailing list