Don't create AP items for empty networks
Current code is sometime attempting to create menu items for wifi networks that have no visible AP. I have no idea why this is happening, but it should fix the symptoms and avoid exceptions. https://bugzilla.gnome.org/show_bug.cgi?id=658150
This commit is contained in:
parent
ce2dc84e49
commit
05e0d5066f
@ -1480,6 +1480,11 @@ NMDeviceWireless.prototype = {
|
||||
},
|
||||
|
||||
_createNetworkItem: function(apObj, position) {
|
||||
if(!apObj.accessPoints || apObj.accessPoints.length == 0) {
|
||||
// this should not happen, but I have no idea why it happens
|
||||
return;
|
||||
}
|
||||
|
||||
if(apObj.connections.length > 0) {
|
||||
if (apObj.connections.length == 1)
|
||||
apObj.item = this._createAPItem(apObj.connections[0], apObj, false);
|
||||
|
Loading…
Reference in New Issue
Block a user