When GetAPplicationBusAddress is called, at-spi sets a callback to handle the
reply. It is possible that the application will go away and the
AtspiApplication will be disposed before this callback is reached, in which
case the reference to the accessibility bus connection will have gone away.
In this case, we should not call GetItems, since app->bus will be NULL and
libdbus will throw a SIGABRT.
dbus_message_unref (reply);
dbus_pending_call_unref (pending);
+ if (!app->bus)
+ return; /* application has gone away / been disposed */
+
message = dbus_message_new_method_call (app->bus_name,
"/org/a11y/atspi/cache",
atspi_interface_cache, "GetItems");