From 7815fbedcd4e1a28ebe4fa832d2b2b6a9185ca34 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 3 Apr 2008 09:16:38 +0000 Subject: [PATCH] * Fixed a bug in Wifi when no wifi interfaces are available --- src/ffluci/model/cbi/admin_wifi/networks.lua | 9 ++++++--- 1 file 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 ebc25715e..c7a1b407d 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 -- 2.25.1