diff --git a/source/blender/editors/interface/interface_layout.cc b/source/blender/editors/interface/interface_layout.cc index 82f76c2f106..0cf35db848c 100644 --- a/source/blender/editors/interface/interface_layout.cc +++ b/source/blender/editors/interface/interface_layout.cc @@ -3602,6 +3602,9 @@ static int menu_item_enum_opname_menu_active(bContext *C, uiBut *but, MenuItemLe /* so the context is passed to itemf functions (some need it) */ WM_operator_properties_sanitize(&ptr, false); PropertyRNA *prop = RNA_struct_find_property(&ptr, lvl->propname); + if (!prop) { + return -1; + } RNA_property_enum_items_gettexted(C, &ptr, prop, &item_array, &totitem, &free); int active = RNA_enum_from_name(item_array, but->str.c_str()); if (free) {