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
This commit is contained in:
Giovanni Campagna 2011-09-18 13:27:50 +01:00 committed by Adel Gadllah
parent 05e0d5066f
commit 82fc66305d

View File

@ -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();