Index: bridge.c
===================================================================
--- bridge.c	(revision 1117)
+++ bridge.c	(working copy)
@@ -1155,18 +1155,21 @@
     }
   else if ((signal_query.signal_id == atk_signal_children_changed) && gobject)
     {
-      detail1 = g_value_get_uint (param_values + 1);
-      gpointer child = g_value_get_pointer (param_values + 2);
-      if (ATK_IS_OBJECT (child))
+      if (detail != NULL)
         {
-          ao = ATK_OBJECT (child);
-          g_object_ref (ao);
+          detail1 = g_value_get_uint (param_values + 1);
+          gpointer child = g_value_get_pointer (param_values + 2);
+          if (ATK_IS_OBJECT (child))
+            {
+              ao = ATK_OBJECT (child);
+              g_object_ref (ao);
+            }
+          else if (strcmp (detail, "add") == 0)
+            {
+              ao = atk_object_ref_accessible_child (ATK_OBJECT (gobject), 
+                                                    detail1);
+            }
         }
-      else if ((detail != NULL) && (strcmp (detail, "add") == 0))
-        {
-          ao = atk_object_ref_accessible_child (ATK_OBJECT (gobject), 
-                                                detail1);
-        }
       if (ao)
         {
           s_ao = spi_accessible_new (ao);
