summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-04-03 09:16:38 +0000
committerSteven Barth <steven@midlink.org>2008-04-03 09:16:38 +0000
commit7815fbedcd4e1a28ebe4fa832d2b2b6a9185ca34 (patch)
treeaef01b0fb5dca817bd5363f5b8535c9f1331aef1 /src
parente4c7d9b596d8ac7ca439cb51968198b2c6495fcb (diff)
* Fixed a bug in Wifi when no wifi interfaces are available
Diffstat (limited to 'src')
-rw-r--r--src/ffluci/model/cbi/admin_wifi/networks.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ffluci/model/cbi/admin_wifi/networks.lua b/src/ffluci/model/cbi/admin_wifi/networks.lua
index ebc25715e2..c7a1b407d4 100644
--- a/src/ffluci/model/cbi/admin_wifi/networks.lua
+++ b/src/ffluci/model/cbi/admin_wifi/networks.lua
@@ -8,9 +8,12 @@ s.anonymous = true
s:option(Value, "ssid", "Netzkennung (ESSID)").maxlength = 32
device = s:option(ListValue, "device", "Gerät")
-for k, v in pairs(ffluci.model.uci.show("wireless").wireless) do
- if v[".type"] == "wifi-device" then
- device:value(k)
+local d = ffluci.model.uci.show("wireless").wireless
+if d then
+ for k, v in pairs(d) do
+ if v[".type"] == "wifi-device" then
+ device:value(k)
+ end
end
end