From 37b3416c5d3eb6d3f9e3ca776e8d7afb2caf33e2 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 26 Sep 2009 18:53:01 +0000 Subject: [PATCH] modules/admin-full: prevent crash in wifi model if no tx power list is available --- modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 613319bfc..63c23441e 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua @@ -25,8 +25,8 @@ local tx_powers = nil m.uci:foreach("wireless", "wifi-iface", function(s) - if s.device == arg[1] and s.ifname and not iw then - iw = luci.sys.wifi.getiwinfo(s.ifname) + if s.device == arg[1] and not iw then + iw = luci.sys.wifi.getiwinfo(s.ifname or s.device) tx_powers = iw.txpwrlist or { } end end) -- 2.11.0