2009-03-29 Christian Persch <chpe@gnome.org>
Bug 577224 – crash when setting new icon after setting icon in
gtkstatusicon
* gtk/gtkstatusicon.c: (gtk_status_icon_reset_image_data),
(gtk_status_icon_set_from_gicon): Retain a reference when setting
from a GIcon, and use g_object_unref on GIcon, not g_free.
svn path=/trunk/; revision=22594
+2009-03-29 Christian Persch <chpe@gnome.org>
+
+ Bug 577224 – crash when setting new icon after setting icon in
+ gtkstatusicon
+
+ * gtk/gtkstatusicon.c: (gtk_status_icon_reset_image_data),
+ (gtk_status_icon_set_from_gicon): Retain a reference when setting
+ from a GIcon, and use g_object_unref on GIcon, not g_free.
+
2009-03-27 Behdad Esfahbod <behdad@gnome.org>
Bug 437533 – Implement draw_shape PangoRenderer method
break;
case GTK_IMAGE_GICON:
- g_free (priv->image_data.gicon);
+ if (priv->image_data.gicon)
+ g_object_unref (priv->image_data.gicon);
priv->image_data.gicon = NULL;
g_object_notify (G_OBJECT (status_icon), "gicon");
g_return_if_fail (GTK_IS_STATUS_ICON (status_icon));
g_return_if_fail (icon != NULL);
+ if (icon)
+ g_object_ref (icon);
+
gtk_status_icon_set_image (status_icon, GTK_IMAGE_GICON,
(gpointer) icon);
}