[Bf-blender-cvs] [30fdfc3] master: Fix for crash generating docs (enums with only callbacks)

Campbell Barton noreply at git.blender.org
Thu Mar 20 09:18:28 CET 2014


Commit: 30fdfc37dd5dbef7e84e688ce620b13e8713045e
Author: Campbell Barton
Date:   Thu Mar 20 19:17:08 2014 +1100
https://developer.blender.org/rB30fdfc37dd5dbef7e84e688ce620b13e8713045e

Fix for crash generating docs (enums with only callbacks)

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

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 479f705..ae0841b 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -821,7 +821,9 @@ static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA
 	    (ptr->type == &RNA_EnumProperty) ||
 	    (C == NULL))
 	{
-		return eprop->item;
+		if (eprop->item) {
+			return eprop->item;
+		}
 	}
 
 	return eprop->itemf(C, ptr, prop, r_free);




More information about the Bf-blender-cvs mailing list