Fix 109320: Crash when showing tooltip in menu search (Intel MacOS)
`uiBut` cannot simply be zero-allocated any more and needs proper construction (so the `std::function` members can be constructed properly for example). I'm not entirely sure where and how exactly the crash happens (happens in release builds only, so probably optimization related), but this change must be done either way and fixes the issue.
This commit is contained in:
@@ -436,7 +436,7 @@ static MenuSearch_Data *menu_items_from_ui_create(
|
||||
const uiStyle *style = UI_style_get_dpi();
|
||||
|
||||
/* Convert into non-ui structure. */
|
||||
MenuSearch_Data *data = (MenuSearch_Data *)MEM_callocN(sizeof(*data), __func__);
|
||||
MenuSearch_Data *data = MEM_new<MenuSearch_Data>(__func__);
|
||||
|
||||
DynStr *dyn_str = BLI_dynstr_new_memarena();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user