Author: cazfi
Date: Wed Oct 28 18:03:39 2015
New Revision: 30285

URL: http://svn.gna.org/viewcvs/freeciv?rev=30285&view=rev
Log:
Fixed double editor icon pixbuf unref from gtk2-client

Reported by Jacob Nevins <jtn>

See bug #23935

Modified:
    branches/S2_5/client/gui-gtk-2.0/editgui.c

Modified: branches/S2_5/client/gui-gtk-2.0/editgui.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-2.0/editgui.c?rev=30285&r1=30284&r2=30285&view=diff
==============================================================================
--- branches/S2_5/client/gui-gtk-2.0/editgui.c  (original)
+++ branches/S2_5/client/gui-gtk-2.0/editgui.c  Wed Oct 28 18:03:39 2015
@@ -847,7 +847,8 @@
     pixbuf = sprite_get_pixbuf(sprite);
     if (pixbuf != NULL) {
       gtk_list_store_set(store, &iter, TVS_COL_IMAGE, pixbuf, -1);
-      g_object_unref(G_OBJECT(pixbuf));
+      /* pixbuf unref will happen automatically when the sprite it was gotten
+       * from gets freed. */
     }
   } resource_type_iterate_end;
 
@@ -940,7 +941,8 @@
     pixbuf = sprite_get_pixbuf(sprite);
     if (pixbuf != NULL) {
       gtk_list_store_set(store, &iter, TVS_COL_IMAGE, pixbuf, -1);
-      g_object_unref(G_OBJECT(pixbuf));
+      /* pixbuf unref will happen automatically when the sprite it was gotten
+       * from gets freed. */
     }
   } unit_type_iterate_end;
 }


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to