[Bf-blender-cvs] [625101d] master: RNA: correct enum flag callback
Campbell Barton
noreply at git.blender.org
Tue Feb 24 09:46:31 CET 2015
Commit: 625101da9942e301e996f00fc498e26cefe713eb
Author: Campbell Barton
Date: Tue Feb 24 19:41:48 2015 +1100
Branches: master
https://developer.blender.org/rB625101da9942e301e996f00fc498e26cefe713eb
RNA: correct enum flag callback
Was returning NULL, auto-completing:
bpy.types.Material.bl_rna.properties["type"].
Would crash, accessing 'default_flag', thanks to @lukastoenne for investigating.
===================================================================
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 3a5c2fe..42e231f 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -813,7 +813,7 @@ static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA
/* incompatible default attributes */
if ((prop_parent->flag & PROP_ENUM_FLAG) != (prop->flag & PROP_ENUM_FLAG)) {
- return NULL;
+ return DummyRNA_NULL_items;
}
if ((eprop->itemf == NULL) ||
More information about the Bf-blender-cvs
mailing list