From: Christian Brabandt Date: Mon, 22 Dec 2025 18:59:50 +0000 (+0000) Subject: patch 9.1.2011: crash when unreferencing gtk icon theme X-Git-Tag: v9.1.2011^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb10f7140200f319c2b4dd392a63c4acf45ab743;p=thirdparty%2Fvim.git patch 9.1.2011: crash when unreferencing gtk icon theme Problem: crash when unreferencing gtk icon theme (noamhalevy-wq, after v9.1.1583) Solution: Remove the g_object_unref() call. gtk_icon_theme_get_default() returns a singleton that should NOT be unreferenced. From GTK documentation: > A unique GtkIconTheme associated with the default screen. This icon theme is associated with the screen and can be used as long as the screen is open. Do not ref or unref it. fixes: #18997 Signed-off-by: Christian Brabandt --- diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index e588c935d4..ec845a36e6 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -2750,9 +2750,7 @@ mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED) icon_theme = gtk_icon_theme_get_default(); if (icon_theme && gtk_icon_theme_has_icon(icon_theme, "gvim")) - { gtk_window_set_icon_name(GTK_WINDOW(gui.mainwin), "gvim"); - } else { /* @@ -2770,7 +2768,6 @@ mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED) g_list_foreach(icons, (GFunc)(void *)&g_object_unref, NULL); g_list_free(icons); } - g_object_unref(icon_theme); } #if !defined(USE_GNOME_SESSION) diff --git a/src/version.c b/src/version.c index dd8fdd6672..247fc47aa5 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2011, /**/ 2010, /**/