Don't crash if we get a object:children-changed event with a non-existent child
authorOwen W. Taylor <otaylor@fishsoup.net>
Thu, 1 Oct 2015 16:43:23 +0000 (12:43 -0400)
committerMike Gorse <mgorse@suse.com>
Mon, 12 Oct 2015 18:31:10 +0000 (13:31 -0500)
If we get a :children-changed event with the path for the child not matching
any accessible in the application, event->any_data would end up with a NULL
child, triggering a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=755951

atspi/atspi-event-listener.c

index 7746ea1..be7d3e9 100644 (file)
@@ -207,6 +207,8 @@ cache_process_children_changed (AtspiEvent *event)
     return;
 
   child = g_value_get_object (&event->any_data);
+  if (child)
+    return;
 
   if (!strncmp (event->type, "object:children-changed:add", 27))
   {