Added Turkish translation
[platform/core/uifw/at-spi2-atk.git] / atk-adaptor / accessible-cache.c
index 5352217..79a369f 100644 (file)
@@ -287,6 +287,11 @@ add_pending_items (gpointer data)
   while (!g_queue_is_empty (to_add))
     {
       current = g_queue_pop_head (to_add);
+
+      /* Make sure object is registerd so we are notified if it goes away */
+      g_free (spi_register_object_to_path (spi_global_register,
+              G_OBJECT (current)));
+
       add_object (cache, G_OBJECT(current));
       g_object_unref (G_OBJECT (current));
     }
@@ -330,7 +335,7 @@ child_added_listener (GSignalInvocationHint * signal_hint,
       if (signal_hint->detail)
         detail = g_quark_to_string (signal_hint->detail);
 
-      if (!strncmp (detail, "add", 3))
+      if (detail && !strncmp (detail, "add", 3))
         {
           gpointer child;
           int index = g_value_get_uint (param_values + 1);