diff --git a/source/blender/windowmanager/intern/wm_splash_screen.cc b/source/blender/windowmanager/intern/wm_splash_screen.cc index 2d87eb0ba1b..04e25730b69 100644 --- a/source/blender/windowmanager/intern/wm_splash_screen.cc +++ b/source/blender/windowmanager/intern/wm_splash_screen.cc @@ -372,17 +372,22 @@ static uiBlock *wm_block_create_custom_splash(bContext *C, ARegion *region, void static int wm_about_custom_exec(bContext *C, wmOperator *op) { - char menutype_str[100] = {0}; + char *menutype_str = MEM_cnew_array(100, __func__); + *menutype_str = '\0'; if (RNA_struct_property_is_set(op->ptr, "menutype")) { RNA_string_get(op->ptr, "menutype", menutype_str); } - UI_popup_block_invoke(C, wm_block_create_custom_splash, menutype_str, nullptr); + UI_popup_block_invoke(C, wm_block_create_custom_splash, menutype_str, MEM_freeN); return OPERATOR_FINISHED; } +static int wm_about_custom_invoke(bContext *C, wmOperator *op , const wmEvent * /*event*/) { + return op->type->exec(C, op); +} + void WM_OT_splash_custom(wmOperatorType *ot) { PropertyRNA *prop; @@ -393,6 +398,7 @@ void WM_OT_splash_custom(wmOperatorType *ot) ot->description = "Open a splash window with some custom information"; ot->exec = wm_about_custom_exec; + ot->invoke = wm_about_custom_invoke; ot->poll = WM_operator_winactive; }