From: Jo-Philipp Wich Date: Sat, 12 Nov 2011 11:27:10 +0000 (+0000) Subject: libs/core: fix removal of wifi networks without interface attached (OpenWrt #10400) X-Git-Tag: 0.11.0~1375 X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;ds=sidebyside;h=cfe48c17d339d6749b25d060d2cf2b980572f2da;p=project%2Fluci.git libs/core: fix removal of wifi networks without interface attached (OpenWrt #10400) --- diff --git a/libs/core/luasrc/model/network.lua b/libs/core/luasrc/model/network.lua index eff84f8108..61da9dfd04 100644 --- a/libs/core/luasrc/model/network.lua +++ b/libs/core/luasrc/model/network.lua @@ -1411,8 +1411,9 @@ function wifinet.adminlink(self) end function wifinet.get_network(self) - if _uci_real:get("network", self.iwdata.network) == "interface" then - return network(self.iwdata.network) + local net = tostring(self.iwdata.network) + if net and _uci_real:get("network", net) == "interface" then + return network(net) end end