Fix T55198: Preferences Keybindings Crash
Operator sanitize function would be called for non operator props. Mistake from 88eafe078a5b5111c.
This commit is contained in:
@@ -4626,6 +4626,9 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
|
||||
PointerRNA *opptr = UI_but_operator_ptr_get(but);
|
||||
wmOperatorType *ot = but->optype;
|
||||
|
||||
/* so the context is passed to itemf functions */
|
||||
WM_operator_properties_sanitize(opptr, false);
|
||||
|
||||
/* if the default property of the operator is enum and it is set,
|
||||
* fetch the tooltip of the selected value so that "Snap" and "Mirror"
|
||||
* operator menus in the Anim Editors will show tooltips for the different
|
||||
@@ -4645,9 +4648,6 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
|
||||
if (!item) {
|
||||
int i;
|
||||
|
||||
/* so the context is passed to itemf functions */
|
||||
WM_operator_properties_sanitize(ptr, false);
|
||||
|
||||
RNA_property_enum_items_gettexted(C, ptr, prop, &items, &totitems, &free_items);
|
||||
for (i = 0, item = items; i < totitems; i++, item++) {
|
||||
if (item->identifier[0] && item->value == value)
|
||||
|
||||
Reference in New Issue
Block a user