Fix #117679: operator_menu_enum crashes for an unfound property #117691
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue