Only query a relation set if it is non-NULL
[platform/core/uifw/at-spi2-atk.git] / atk-adaptor / accessible-cache.c
index c7e27f9..813d03f 100644 (file)
@@ -155,6 +155,11 @@ remove_object (GObject * source, GObject * gobj, gpointer data)
   
   if (spi_cache_in (cache, gobj))
     {
+#ifdef SPI_ATK_DEBUG
+  g_debug ("CACHE REM - %s - %d - %s\n", atk_object_get_name (ATK_OBJECT (gobj)),
+            atk_object_get_role (ATK_OBJECT (gobj)),
+            spi_register_object_to_path (spi_global_register, gobj));
+#endif
       g_signal_emit (cache, cache_signals [OBJECT_REMOVED], 0, gobj);
       g_hash_table_remove (cache->objects, gobj);
     }
@@ -168,7 +173,7 @@ add_object (SpiCache * cache, GObject * gobj)
   g_hash_table_insert (cache->objects, gobj, NULL);
 
 #ifdef SPI_ATK_DEBUG
-  g_debug ("CACHE  - %s - %d - %s", atk_object_get_name (ATK_OBJECT (gobj)),
+  g_debug ("CACHE ADD - %s - %d - %s\n", atk_object_get_name (ATK_OBJECT (gobj)),
             atk_object_get_role (ATK_OBJECT (gobj)),
             spi_register_object_to_path (spi_global_register, gobj));
 #endif
@@ -312,7 +317,7 @@ child_added_listener (GSignalInvocationHint * signal_hint,
       if (signal_hint->detail)
         detail = g_quark_to_string (signal_hint->detail);
 
-      if (!strcmp (detail, "add"))
+      if (!g_strcmp0 (detail, "add"))
         {
           gpointer child;
           int index = g_value_get_uint (param_values + 1);