From 82fc66305dc91f88e77dfa10d2f94d388a18d774 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Sun, 18 Sep 2011 13:27:50 +0100 Subject: [PATCH] Clear the active network when removing the active access point When the active AP disappears, it is possible to receive the "access-point-removed" signal before the "notify::active-ap" (as dbus-glib + libnm-glib property notifications are not reliable). In that case, we would remove the AP from the network object, thus an attempt to update the UI would create an item for an empty network. https://bugzilla.gnome.org/show_bug.cgi?id=658150 --- js/ui/status/network.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 0d5eaad06..9730afced 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1291,6 +1291,9 @@ NMDeviceWireless.prototype = { apObj.accessPoints.splice(i, 1); if (apObj.accessPoints.length == 0) { + if (this._activeNetwork == apObj) + this._activeNetwork = null; + if (apObj.item) apObj.item.destroy();