[at-spi2-core] Fix another crash with disposed applications



commit f1ee0e260460241519fa0dd5fd7b37ec3f4c62eb
Author: Mike Gorse <mgorse novell com>
Date:   Mon Jan 3 09:42:19 2011 -0600

    Fix another crash with disposed applications

 atspi/atspi-misc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index dd014a8..2b62ff9 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]