From: Jo-Philipp Wich Date: Wed, 26 Sep 2012 17:34:58 +0000 (+0000) Subject: modules/admin-full: cope with undefined frequency lists X-Git-Tag: 0.11.0~40 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=02ac6686fe8165a3965fd79e3fb32aaf1f831c79;p=oweals%2Fluci.git modules/admin-full: cope with undefined frequency lists --- diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua index bcc441621..f645493a6 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua @@ -166,7 +166,7 @@ if has_sta then else ch = s:taboption("general", Value, "channel", translate("Channel")) ch:value("auto", translate("auto")) - for _, f in ipairs(iw and iw.freqlist) do + for _, f in ipairs(iw and iw.freqlist or { }) do if not f.restricted then ch:value(f.channel, "%i (%.3f GHz)" %{ f.channel, f.mhz / 1000 }) end