modules/admin-full: fix wireless interface removal if not network was assigned to the iface, thanks Viktar Palstsiuk <viktar.palstsiuk@promwad.com>

This commit is contained in:
Jo-Philipp Wich 2012-01-06 16:28:54 +00:00
parent 862176ee07
commit 1e0e458ff3

View file

@ -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