From 1f6c5b248cd0c15d6cb34143ff6f7c8b373fe7d9 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Thu, 1 Dec 2011 12:21:41 +0100 Subject: [PATCH] technology: Check if pending message is NULL before sending it back The message would be NULL when setting offline mode on and off. Fixes BMC#24314 --- src/technology.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/technology.c b/src/technology.c index cfa7972..fb28ca5 100644 --- a/src/technology.c +++ b/src/technology.c @@ -881,7 +881,8 @@ int __connman_technology_enable(enum connman_service_type type, DBusMessage *msg done: if (ret == 0) { - g_dbus_send_reply(connection, msg, DBUS_TYPE_INVALID); + if (msg != NULL) + g_dbus_send_reply(connection, msg, DBUS_TYPE_INVALID); return ret; } @@ -967,7 +968,8 @@ int __connman_technology_disable(enum connman_service_type type, DBusMessage *ms done: if (ret == 0) { - g_dbus_send_reply(connection, msg, DBUS_TYPE_INVALID); + if (msg != NULL) + g_dbus_send_reply(connection, msg, DBUS_TYPE_INVALID); return ret; } -- 2.7.4