From: Foxe Chen Date: Tue, 21 Jul 2026 16:23:32 +0000 (+0000) Subject: patch 9.2.0822: GTK4: crash menu id is null in gui_mch_destroy_menu() X-Git-Tag: v9.2.0822^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbbd6f99e8fb0371a7b15c0cec4810b1918a6b10;p=thirdparty%2Fvim.git patch 9.2.0822: GTK4: crash menu id is null in gui_mch_destroy_menu() Problem: GTK4: crash menu id is null in gui_mch_destroy_menu() Solution: Check that menu->id is not null before calling vim_menu_remove() (Foxe Chen). closes: #20724 Signed-off-by: Foxe Chen Signed-off-by: Christian Brabandt --- diff --git a/src/gui_gtk4.c b/src/gui_gtk4.c index fbe4ec5535..a194edd760 100644 --- a/src/gui_gtk4.c +++ b/src/gui_gtk4.c @@ -4844,7 +4844,8 @@ gui_mch_destroy_menu(vimmenu_T *menu) else if (menu->parent == NULL) // Remove from menubar vim_menu_bar_remove(VIM_MENU_BAR(gui.menubar), menu->id); - else + // "menu->id" is NULL for window toolbar + else if (menu->id != NULL) // Remove from parent menu vim_menu_remove(VIM_MENU(menu->parent->submenu_id), menu->id); diff --git a/src/version.c b/src/version.c index 5d8f6e9aa2..267d273de1 100644 --- a/src/version.c +++ b/src/version.c @@ -759,6 +759,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 822, /**/ 821, /**/