gnome-games r8140 - trunk/aisleriot



Author: jclinton
Date: Tue Oct 21 19:44:30 2008
New Revision: 8140
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8140&view=rev

Log:
Take a reference to the AisleriotCard when storing it in the slot
array.

Modified:
   trunk/aisleriot/board.c

Modified: trunk/aisleriot/board.c
==============================================================================
--- trunk/aisleriot/board.c	(original)
+++ trunk/aisleriot/board.c	Tue Oct 21 19:44:30 2008
@@ -827,8 +827,10 @@
   for (i = size; i < card_images->len; i++) {
     ClutterActor *actor = g_ptr_array_index (card_images, i);
 
-    if (actor)
+    if (actor) {
       clutter_actor_destroy (actor);
+      g_object_unref (actor);
+    }
   }
 
   g_ptr_array_set_size (card_images, size);
@@ -884,7 +886,7 @@
 
     clutter_container_add (CLUTTER_CONTAINER (stage), card_tex, NULL);
 
-    g_ptr_array_add (card_images, card_tex);
+    g_ptr_array_add (card_images, g_object_ref_sink (card_tex));
 
     cardx += slot->pixeldx;
     cardy += slot->pixeldy;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]