gtk+ r22594 - in trunk: . gtk
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r22594 - in trunk: . gtk
- Date: Sun, 29 Mar 2009 21:25:13 +0000 (UTC)
Author: chpe
Date: Sun Mar 29 21:25:13 2009
New Revision: 22594
URL: http://svn.gnome.org/viewvc/gtk+?rev=22594&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/gtk/gtkstatusicon.c
Modified: trunk/gtk/gtkstatusicon.c
==============================================================================
--- trunk/gtk/gtkstatusicon.c (original)
+++ trunk/gtk/gtkstatusicon.c Sun Mar 29 21:25:13 2009
@@ -1780,7 +1780,8 @@
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");
@@ -1949,6 +1950,9 @@
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]