modules/admin-full: cope with undefined frequency lists
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 26 Sep 2012 17:34:58 +0000 (17:34 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 26 Sep 2012 17:34:58 +0000 (17:34 +0000)
modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua

index bcc4416..f645493 100644 (file)
@@ -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