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).
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);
}
}