clutter-id-pool: fix warning on bad pick
authorDan Winship <danw@gnome.org>
Thu, 19 May 2011 14:46:24 +0000 (10:46 -0400)
committerDan Winship <danw@gnome.org>
Thu, 26 May 2011 12:48:13 +0000 (08:48 -0400)
Commit 13ac1fe7 purported to extend the _clutter_id_pool_lookup()
warning to the case where the id referred to a deleted actor, but did
not actually do so, because _clutter_id_pool_remove() set deleted IDs
to 0xdecafbad, not NULL. Fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=650597

clutter/clutter-id-pool.c

index 9978cb0..bd224f3 100644 (file)
@@ -101,8 +101,7 @@ _clutter_id_pool_remove (ClutterIDPool *id_pool,
 
   array = (void*) id_pool->array->data;
 
-  /* set pointer to a recognizably voided value */
-  array[id_] = (void*)0xdecafbad;
+  array[id_] = NULL;
 
   id_pool->free_ids = g_slist_prepend (id_pool->free_ids,
                                        GUINT_TO_POINTER (id_));