modules/admin-full: fix wireless interface removal if not network was assigned to...
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 6 Jan 2012 16:28:54 +0000 (16:28 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 6 Jan 2012 16:28:54 +0000 (16:28 +0000)
modules/admin-full/luasrc/controller/admin/network.lua

index a298443645fea616d5351aab572411cb2bdc06fa..5a102668df822a8463cbed87df78f2288bbbc18d 100644 (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