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 b02cfd5..75f9529 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