fix deathscreen when opening wlan network list (ssid list) and the currently
[enigma2.git] / lib / python / Screens / NetworkSetup.py
index 8bffaf728886c96ba620b1fcc442402baa277815..a3f39d67d6f47a4570eafa4c6a6e06c711262109 100644 (file)
@@ -172,7 +172,10 @@ class AdapterSetup(Screen, ConfigListScreen):
                                        self.nwlist.append("No Networks found")
                                
                        wsconfig = self.ws.loadConfig()
-                       config.plugins.wlan.essid = NoSave(ConfigSelection(self.nwlist, default = self.essid or wsconfig['ssid'] ))
+                       default = self.essid or wsconfig['ssid']
+                       if default not in self.nwlist:
+                               self.nwlist.append(default)
+                       config.plugins.wlan.essid = NoSave(ConfigSelection(self.nwlist, default = default ))
                        config.plugins.wlan.encryption.enabled = NoSave(ConfigYesNo(default = wsconfig['encryption'] ))
                        config.plugins.wlan.encryption.type = NoSave(ConfigSelection(list, default = wsconfig['encryption_type'] ))
                        config.plugins.wlan.encryption.psk = NoSave(ConfigText(default = wsconfig['key'], fixed_size = False,visible_width = 30))