From: Mike Gorse Date: Tue, 18 Sep 2012 00:06:40 +0000 (-0500) Subject: Fix an errant g_object_unref X-Git-Tag: AT_SPI2_ATK_2_12_0~69 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da10ef8b744bf7b04d18bda4cead3a9d71548a3e;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git Fix an errant g_object_unref If an object is deregistered but not in the cache, then only unref it if it was found in the queue of objects to be added (ie, it is possible that it is leased, rather than queued to be cached, in which case it should not be unrefed). --- diff --git a/atk-adaptor/accessible-cache.c b/atk-adaptor/accessible-cache.c index 3a30b51..be247e4 100644 --- a/atk-adaptor/accessible-cache.c +++ b/atk-adaptor/accessible-cache.c @@ -179,9 +179,8 @@ remove_object (GObject * source, GObject * gobj, gpointer data) g_signal_emit (cache, cache_signals [OBJECT_REMOVED], 0, gobj); g_hash_table_remove (cache->objects, gobj); } - else + else if (g_queue_remove (cache->add_traversal, gobj)) { - g_queue_remove (cache->add_traversal, gobj); g_object_unref (gobj); } }