diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-11-12 11:27:10 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-11-12 11:27:10 +0000 |
commit | cfe48c17d339d6749b25d060d2cf2b980572f2da (patch) | |
tree | 128406a535c666d2bcdf12784de89491716a2338 /libs | |
parent | e50dea1cf7301c0b8d7cc29f03de350a10bafab7 (diff) |
libs/core: fix removal of wifi networks without interface attached (OpenWrt #10400)
Diffstat (limited to 'libs')
-rw-r--r-- | libs/core/luasrc/model/network.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/core/luasrc/model/network.lua b/libs/core/luasrc/model/network.lua index eff84f810..61da9dfd0 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 |