From: Jo-Philipp Wich Date: Fri, 6 Jan 2012 16:28:54 +0000 (+0000) Subject: modules/admin-full: fix wireless interface removal if not network was assigned to... X-Git-Tag: 0.11.0~1188 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1e0e458ff3a2ab0ff9b415c5b2ae1a4977aa1463;p=oweals%2Fluci.git modules/admin-full: fix wireless interface removal if not network was assigned to the iface, thanks Viktar Palstsiuk --- diff --git a/modules/admin-full/luasrc/controller/admin/network.lua b/modules/admin-full/luasrc/controller/admin/network.lua index a29844364..5a102668d 100644 --- a/modules/admin-full/luasrc/controller/admin/network.lua +++ b/modules/admin-full/luasrc/controller/admin/network.lua @@ -219,7 +219,7 @@ function wifi_delete(network) luci.sys.call("env -i /sbin/wifi down %q >/dev/null" % dev:name()) ntm:del_wifinet(network) ntm:commit("wireless") - if net:is_empty() then + if net and net:is_empty() then ntm:del_network(net:name()) ntm:commit("network") end