g_signal_emit (cache, cache_signals [OBJECT_REMOVED], 0, gobj);
g_hash_table_remove (cache->objects, gobj);
}
+ else
+ g_queue_remove (cache->add_traversal, gobj);
}
static void
current = g_queue_pop_head (cache->add_traversal);
set = atk_object_ref_state_set (current);
- if (!atk_state_set_contains_state (set, ATK_STATE_TRANSIENT))
+ if (set && !atk_state_set_contains_state (set, ATK_STATE_TRANSIENT))
{
g_queue_push_tail (to_add, current);
if (!spi_cache_in (cache, G_OBJECT (current)) &&
}
}
- g_object_unref (set);
+ if (set)
+ g_object_unref (set);
}
while (!g_queue_is_empty (to_add))
const GValue * param_values, gpointer data)
{
SpiCache *cache = spi_global_cache;
- gboolean child_needs_ref = TRUE;
AtkObject *accessible;
- AtkObject *child;
const gchar *detail = NULL;
gpointer child;
int index = g_value_get_uint (param_values + 1);
child = g_value_get_pointer (param_values + 2);
-
- if (!ATK_IS_OBJECT (child))
+ if (!child)
{
- child = atk_object_ref_accessible_child (accessible, index);
- child_needs_ref = FALSE;
+ g_static_rec_mutex_unlock (&cache_mutex);
+ return;
}
- if (child_needs_ref)
- g_object_ref (child);
+
+ g_object_ref (child);
g_queue_push_tail (cache->add_traversal, child);
if (cache->add_pending_idle == 0)