Author: cazfi
Date: Wed Oct 28 18:03:26 2015
New Revision: 30283

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

Reported by Jacob Nevins <jtn>

See bug #23935

Modified:
    trunk/client/gui-gtk-2.0/editgui.c

Modified: trunk/client/gui-gtk-2.0/editgui.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/editgui.c?rev=30283&r1=30282&r2=30283&view=diff
==============================================================================
--- trunk/client/gui-gtk-2.0/editgui.c  (original)
+++ trunk/client/gui-gtk-2.0/editgui.c  Wed Oct 28 18:03:26 2015
@@ -811,7 +811,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;
 
@@ -900,7 +901,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