Remove erroneous debug print introduced in last commit
[platform/core/uifw/at-spi2-atk.git] / atk-adaptor / accessible-cache.c
index 20796d5..afaedb0 100644 (file)
@@ -321,9 +321,7 @@ child_added_listener (GSignalInvocationHint * signal_hint,
                       const GValue * param_values, gpointer data)
 {
   SpiCache *cache = spi_global_cache;
-  gboolean child_needs_ref = TRUE;
   AtkObject *accessible;
-  AtkObject *child;
 
   const gchar *detail = NULL;
 
@@ -352,14 +350,13 @@ child_added_listener (GSignalInvocationHint * signal_hint,
           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)
@@ -425,6 +422,9 @@ spi_cache_foreach (SpiCache * cache, GHFunc func, gpointer data)
 gboolean
 spi_cache_in (SpiCache * cache, GObject * object)
 {
+  if (!cache)
+    return FALSE;
+
   if (g_hash_table_lookup_extended (cache->objects,
                                     object,
                                     NULL,