From 280d606cd41c5d607e56d48e57bcba5b654cfa2e Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 19 Jun 2013 09:32:38 +0200 Subject: IconCache: Keep a ref on the GtkIconData The icon data in GttkIconInfo->data is currently owned by the IconThemeDir->icon_data hashtable. However, on e.g. a theme change blow_themes() destroys the dirs and thus the data, meaning any outstanding GtkIconInfo points to stale data. We solve this by adding a refcount to GtkIconData and reffing it from GtkIconInfo. https://bugzilla.gnome.org/show_bug.cgi?id=702598 --- gtk/gtkiconcache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gtk/gtkiconcache.h') diff --git a/gtk/gtkiconcache.h b/gtk/gtkiconcache.h index 07e909d1a3..767e2b62cc 100644 --- a/gtk/gtkiconcache.h +++ b/gtk/gtkiconcache.h @@ -25,6 +25,7 @@ typedef struct _GtkIconData GtkIconData; struct _GtkIconData { + gint ref; gboolean has_embedded_rect; gint x0, y0, x1, y1; -- cgit v1.2.1