Fix another crash with disposed applications
authorMike Gorse <mgorse@novell.com>
Mon, 3 Jan 2011 15:42:19 +0000 (09:42 -0600)
committerMike Gorse <mgorse@novell.com>
Mon, 3 Jan 2011 15:42:19 +0000 (09:42 -0600)
atspi/atspi-misc.c

index dd014a8..2b62ff9 100644 (file)
@@ -1159,6 +1159,10 @@ _atspi_dbus_send_with_reply_and_block (DBusMessage *message)
   DBusConnection *bus;
 
   app = get_application (dbus_message_get_destination (message));
+
+  if (app && !app->bus)
+    return NULL;       /* will fail anyway; app has been disposed */
+
   bus = (app ? app->bus : _atspi_bus());
   dbus_error_init (&err);
   reply = dbind_send_and_allow_reentry (bus, message, &err);