From: Yasuhiro Matsumoto Date: Sun, 14 Jun 2026 14:44:48 +0000 (+0000) Subject: patch 9.2.0641: GTK4: crash in gui_mch_menu_hidden() X-Git-Tag: v9.2.0641^0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb3208a5f6d143bd02b7aa34ddc44701b7b5eb0a;p=thirdparty%2Fvim.git patch 9.2.0641: GTK4: crash in gui_mch_menu_hidden() Problem: GTK4: crash in gui_mch_menu_hidden() Solution: Skip the sentinel like gui_mch_menu_grey() does (Yasuhiro Matsumoto). Menu items use the (GtkWidget *)1 sentinel as their id, but gui_mch_menu_hidden() only skipped NULL ids and passed the sentinel to gtk_widget_get_visible(), causing a SEGV. closes: #20523 Signed-off-by: Yasuhiro Matsumoto Signed-off-by: Christian Brabandt --- diff --git a/src/gui_gtk4.c b/src/gui_gtk4.c index 77ac056366..b3135a0ab8 100644 --- a/src/gui_gtk4.c +++ b/src/gui_gtk4.c @@ -2685,7 +2685,9 @@ gui_mch_menu_grey(vimmenu_T *menu, int grey) void gui_mch_menu_hidden(vimmenu_T *menu, int hidden) { - if (menu->id == 0) + // GMenu-based menu items have no real widget, only the (GtkWidget *)1 + // marker; they cannot be toggled via the widget API. + if (menu->id == NULL || menu->id == (GtkWidget *)1) return; if (hidden) diff --git a/src/version.c b/src/version.c index 2e42bb3576..83d1e80584 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 */ +/**/ + 641, /**/ 640, /**/