applications/meshwizard: Fox error when iwinfo.freqlist is empty
authorManuel Munz <freifunk@somakoma.de>
Sun, 27 Apr 2014 13:45:53 +0000 (13:45 +0000)
committerManuel Munz <freifunk@somakoma.de>
Sun, 27 Apr 2014 13:45:53 +0000 (13:45 +0000)
applications/luci-meshwizard/luasrc/model/cbi/freifunk/meshwizard.lua

index a8d07cbecec9dd726edcec38bd6d7c243a8c02e6..8cb08228753020cdf9baa36067667e43f9bf9e60 100644 (file)
@@ -118,7 +118,7 @@ uci:foreach("wireless", "wifi-device", function(section)
        chan:value('default')
 
        local iwinfo = sys.wifi.getiwinfo(device)
-       if iwinfo then
+       if iwinfo and iwinfo.freqlist then
                for _, f in ipairs(iwinfo.freqlist) do
                        if not f.restricted then
                                chan:value(f.channel)