From c91278a5b4be706e1d580898487683d80c846830 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 6 Jan 2010 21:31:13 +0200 Subject: [PATCH] dbus: Do not try to unregister not-yet-registered network object --- wpa_supplicant/dbus/dbus_new.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c index 05e693632..9e90629ae 100644 --- a/wpa_supplicant/dbus/dbus_new.c +++ b/wpa_supplicant/dbus/dbus_new.c @@ -1073,7 +1073,8 @@ int wpas_dbus_unregister_network(struct wpa_supplicant *wpa_s, int nid) int ret; /* Do nothing if the control interface is not turned on */ - if (wpa_s == NULL || wpa_s->global == NULL) + if (wpa_s == NULL || wpa_s->global == NULL || + wpa_s->dbus_new_path == NULL) return 0; ctrl_iface = wpa_s->global->dbus; if (ctrl_iface == NULL)