diff options
author | Dan Eicher <dan@eu.phorio.us> | 2012-06-22 00:14:27 +0400 |
---|---|---|
committer | Dan Eicher <dan@eu.phorio.us> | 2012-06-22 00:14:27 +0400 |
commit | 884d80067762beda8b803741c1ff9244f6f74ace (patch) | |
tree | 29ab7c18e017f59ccfedf8b3859b307f6b7cbdf3 /source/blender/editors | |
parent | 9b8a97c039d88104e438f372c13d5d64b222347d (diff) |
[#31885] uiItemMenuEnumO / layout.operator_menu_enum() fails silently with bad property argument.
uiItemsFullEnumO() not displaying an RNA_warning if the prop doesn't exist/isn't an enum
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 29f257fc669..3270015271a 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -843,6 +843,14 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname MEM_freeN(item); } } + else if (prop && RNA_property_type(prop) != PROP_ENUM) { + RNA_warning("%s.%s, not an enum type", RNA_struct_identifier(ptr.type), propname); + return; + } + else { + RNA_warning("%s.%s not found", RNA_struct_identifier(ptr.type), propname); + return; + } } void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname) |