modules/admin-full: fix wireless interface removal if not network was assigned to...
[project/luci.git] / modules / admin-full / luasrc / controller / admin / network.lua
index a298443..5a10266 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