From fcc5945028490577fbb927b8b84a26b8c7afb124 Mon Sep 17 00:00:00 2001 From: Mohamed Abbas Date: Tue, 29 Mar 2011 15:20:03 -0700 Subject: [PATCH] ofono: Check for info pointer in set_active_reply When ofono_disconnect() is being called before receiving the set_active() reply back, info will be NULL. Fixes BMC#14518 --- plugins/ofono.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/ofono.c b/plugins/ofono.c index 3e71441..f126de9 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -446,10 +446,13 @@ static void set_active_reply(DBusPendingCall *call, void *user_data) info = g_hash_table_lookup(network_hash, path); - DBG("path %s network %p", path, info->network); - reply = dbus_pending_call_steal_reply(call); + if (info == NULL) + goto done; + + DBG("path %s network %p", path, info->network); + if (!pending_network_is_available(info->network)) goto done; -- 2.7.4