From 3220912760e0f6254d14aaac28a5e76215720670 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 25 Aug 2023 19:14:19 +0200 Subject: [PATCH] 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. --- .../blender/editors/interface/interface_template_search_menu.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface_template_search_menu.cc b/source/blender/editors/interface/interface_template_search_menu.cc index 31a3d7d5d90..8b1def728bc 100644 --- a/source/blender/editors/interface/interface_template_search_menu.cc +++ b/source/blender/editors/interface/interface_template_search_menu.cc @@ -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(__func__); DynStr *dyn_str = BLI_dynstr_new_memarena();