luci-0.10: merge r8151
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 6 Jan 2012 16:30:29 +0000 (16:30 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 6 Jan 2012 16:30:29 +0000 (16:30 +0000)
modules/admin-full/luasrc/controller/admin/network.lua

index b02cfd5766e7c382b728a6dbc3f46b4dc3e9953c..75f952944186b5355ded9359b38a3985a927f74c 100644 (file)
@@ -206,7 +206,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