From 991e67ddc756cdbf6e85b9a0520792d1f48026e4 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 14 Oct 2009 19:19:43 +0000 Subject: RNA: * Enums with an _itemf callback now never get context NULL passed in, rather a fixed list of enum items are defined which should contain all items (if possible), from which the _itemf callback can then use a subset. --- source/blender/makesrna/intern/rna_rna.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '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 fbb24f9ada9..31aecbb8a76 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -624,7 +624,7 @@ static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA rna_idproperty_check(&prop, ptr); eprop= (EnumPropertyRNA*)prop; - if(eprop->itemf==NULL || eprop->itemf==rna_EnumProperty_default_itemf) + if(eprop->itemf==NULL || eprop->itemf==rna_EnumProperty_default_itemf || !C) return eprop->item; return eprop->itemf(C, ptr, free); -- cgit v1.2.3