* dbind/dbind.c
Add some checks for the method call method.
Check destination is not null, this otherwise
caused a segfault.
This fixes the dbind unit tests.
DBusMessage *msg = NULL, *reply = NULL;
DBusError *err, real_err;
char *p;
+ char *dest;
if (opt_error)
err = opt_error;
}
}
- if (!strcmp (dbus_bus_get_unique_name(cnx), dbus_message_get_destination(msg)))
+ dest = dbus_message_get_destination(msg);
+ if (!dest)
+ goto out;
+ if (!strcmp (dbus_bus_get_unique_name(cnx), dest))
{
/* Can't use dbus_message_send_with_reply_and_block because it will
* not pass messages on to the provider side, causing deadlock */