From f301e07d815e654d18994a7674ac5a6ad60b3546 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 21 Nov 2013 09:53:40 +0200 Subject: [PATCH] core: Fix missing NULL check for msg device_request_disconnect can be called with msg being NULL, however g_dbus_send_reply cannot. Therefore, add a check for msg before calling g_dbus_send_reply. --- src/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 82b66e65c..c0e317dd5 100644 --- a/src/device.c +++ b/src/device.c @@ -1100,7 +1100,8 @@ void device_request_disconnect(struct btd_device *device, DBusMessage *msg) } if (!device->connected) { - g_dbus_send_reply(dbus_conn, msg, DBUS_TYPE_INVALID); + if (msg) + g_dbus_send_reply(dbus_conn, msg, DBUS_TYPE_INVALID); return; } -- 2.47.3