Fix #122276: Crash when searching for a Collection Instance
This search menu creation/refreshing function relies on the operator pointer which might be dangling. There are more such cases, will fix in followup commits.
This commit is contained in:
parent
8542797c6f
commit
8ea79dc3a7
@ -1149,7 +1149,9 @@ int WM_enum_search_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/
|
||||
{
|
||||
static EnumSearchMenu search_menu;
|
||||
search_menu.op = op;
|
||||
UI_popup_block_invoke(C, wm_enum_search_menu, &search_menu, nullptr);
|
||||
/* Refreshing not supported, because operator might get freed. */
|
||||
const bool can_refresh = false;
|
||||
UI_popup_block_invoke_ex(C, wm_enum_search_menu, &search_menu, nullptr, can_refresh);
|
||||
return OPERATOR_INTERFACE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user