[Bf-committers] [PATCH] Fix crash in rna_access.c

Jochen Schmitt Jochen at herr-schmitt.de
Mon Jun 3 18:28:44 CEST 2013


Hello,

a user has reported a crash in rna_access.c on http://bugzilla.redhat.com at 
B/ #969043. I have create the attached patch for fixing this issue. It may be
nice, if anyoune can get a look on it.

Best Regards:

Jochen Schmitt

diff -up blender-2.67a/source/blender/makesrna/intern/rna_access.c.rna blender-2.67a/source/blender/makesrna/intern/rna_access.c
--- blender-2.67a/source/blender/makesrna/intern/rna_access.c.rna	2013-06-03 17:18:37.070246295 +0200
+++ blender-2.67a/source/blender/makesrna/intern/rna_access.c	2013-06-03 17:37:49.453608060 +0200
@@ -1273,8 +1273,9 @@ void RNA_property_enum_items_gettexted(b
 			int totitem = 0;
 
 			/* count */
-			for (i = 0; (*item)[i].identifier; i++)
-				totitem++;
+			if (*item)
+			  for (i = 0; (*item)[i].identifier; i++)
+			    totitem++;
 
 			nitem = MEM_callocN(sizeof(EnumPropertyItem) * (totitem + 1), "enum_items_gettexted");
 


More information about the Bf-committers mailing list