summaryrefslogtreecommitdiff
path: root/dbind
diff options
context:
space:
mode:
authorMike Gorse <mgorse@novell.com>2010-12-28 11:18:06 -0500
committerMike Gorse <mgorse@novell.com>2010-12-28 11:18:06 -0500
commitcda93ea81e71932bc8ad4cf74e9e76124548783c (patch)
treeb57026dbe36ec37d94b0b4cf0f72e80771ceff20 /dbind
parent5e4e37ec0a1a20a80ff2d3ec855a70146e76e10c (diff)
downloadat-spi2-core-cda93ea81e71932bc8ad4cf74e9e76124548783c.tar.gz
dbind_send-and_allow_reentry: Avoid crashing if destination is NULL
Diffstat (limited to 'dbind')
-rw-r--r--dbind/dbind.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dbind/dbind.c b/dbind/dbind.c
index fcf76ddf..29f50cb1 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;