Skip to content

Commit bb10f71

Browse files
committed
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 <cb@256bit.org>
1 parent a90e804 commit bb10f71

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/gui_gtk_x11.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2750,9 +2750,7 @@ mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
27502750
icon_theme = gtk_icon_theme_get_default();
27512751

27522752
if (icon_theme && gtk_icon_theme_has_icon(icon_theme, "gvim"))
2753-
{
27542753
gtk_window_set_icon_name(GTK_WINDOW(gui.mainwin), "gvim");
2755-
}
27562754
else
27572755
{
27582756
/*
@@ -2770,7 +2768,6 @@ mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
27702768
g_list_foreach(icons, (GFunc)(void *)&g_object_unref, NULL);
27712769
g_list_free(icons);
27722770
}
2773-
g_object_unref(icon_theme);
27742771
}
27752772

27762773
#if !defined(USE_GNOME_SESSION)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,8 @@ static char *(features[]) =
734734

735735
static int included_patches[] =
736736
{ /* Add new patch number below this line */
737+
/**/
738+
2011,
737739
/**/
738740
2010,
739741
/**/

0 commit comments

Comments
 (0)