[at-spi2-atk] Check for a NULL pending call before calling dbus_pending_call_set_notify



commit 2f13618db024213d0dd755a83fe284632661a490
Author: Mike Gorse <mgorse novell com>
Date:   Mon Jan 3 11:05:34 2011 -0600

    Check for a NULL pending call before calling dbus_pending_call_set_notify

 atk-adaptor/bridge.c |    3 ++-
 atk-adaptor/event.c  |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
index 6a2ba15..6e74fcd 100644
--- a/atk-adaptor/bridge.c
+++ b/atk-adaptor/bridge.c
@@ -303,7 +303,8 @@ register_application (SpiBridge * app)
   dbus_message_iter_init_append (message, &iter);
   spi_object_append_reference (&iter, app->root);
   
-    if (!dbus_connection_send_with_reply (app->bus, message, &pending, -1))
+    if (!dbus_connection_send_with_reply (app->bus, message, &pending, -1)
+        || !pending)
     {
         return FALSE;
     }
diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c
index 9e6e83e..63cb9a5 100644
--- a/atk-adaptor/event.c
+++ b/atk-adaptor/event.c
@@ -88,7 +88,7 @@ send_and_allow_reentry (DBusConnection * bus, DBusMessage * message)
   closure.loop = g_main_loop_new (main_context, FALSE);
   switch_main_context (main_context);
 
-  if (!dbus_connection_send_with_reply (bus, message, &pending, -1))
+  if (!dbus_connection_send_with_reply (bus, message, &pending, -1) || !pending)
     {
       switch_main_context (NULL);
       return NULL;



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