[at-spi2-core] dbind_send-and_allow_reentry: Avoid crashing if destination is NULL



commit cda93ea81e71932bc8ad4cf74e9e76124548783c
Author: Mike Gorse <mgorse novell com>
Date:   Tue Dec 28 11:18:06 2010 -0500

    dbind_send-and_allow_reentry: Avoid crashing if destination is NULL

 dbind/dbind.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/dbind/dbind.c b/dbind/dbind.c
index fcf76dd..29f50cb 100644
--- a/dbind/dbind.c
+++ b/dbind/dbind.c
@@ -35,9 +35,10 @@ dbind_send_and_allow_reentry (DBusConnection * bus, DBusMessage * message, DBusE
   DBusPendingCall *pending;
   SpiReentrantCallClosure closure;
   const char *unique_name = dbus_bus_get_unique_name (bus);
+  const char *destination = dbus_message_get_destination (message);
 
-  if (unique_name &&
-      strcmp (dbus_message_get_destination (message), unique_name) != 0)
+  if (unique_name && destination &&
+      strcmp (destination, unique_name) != 0)
     return dbus_connection_send_with_reply_and_block (bus, message, dbind_timeout, error);
 
   closure.reply = NULL;



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