Fix failure in our UI code that could allow search button without search callbacks, leading to crash.
Related to (exposed by) T52735, fixes the reported crash but not the underlying issue. To be backported to 2.79a should we do one.
This commit is contained in:
parent
d827186c17
commit
c57636f060
Notes:
blender-bot
2023-02-14 06:30:08 +01:00
Referenced by commit 17f1ce4d4f
, Fix T53630: Effect strips not displaying Input data.
Referenced by issue #53683, 2.79a release
Referenced by issue #53630, Effect strips not displaying Input data
Referenced by issue #52977, Parent bone name disappeared in the UI in pose mode
|
@ -1726,6 +1726,10 @@ void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRN
|
|||
|
||||
UI_but_func_search_set(but, ui_searchbox_create_generic, rna_search_cb, but, NULL, NULL);
|
||||
}
|
||||
else if (but->type == UI_BTYPE_SEARCH_MENU) {
|
||||
/* In case we fail to find proper searchprop, so other code might have already set but->type to search menu... */
|
||||
but->type = UI_BTYPE_LABEL;
|
||||
}
|
||||
}
|
||||
|
||||
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
|
||||
|
|
Loading…
Reference in New Issue