aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--awall/init.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/awall/init.lua b/awall/init.lua
index 04c2fc4..7af4d92 100644
--- a/awall/init.lua
+++ b/awall/init.lua
@@ -122,8 +122,10 @@ function Config:init(policyconfig)
local r = events[event].rules
if r then
if type(r) == 'function' then r = r(self.objects) end
- assert(type(r) == 'table')
- insertrules(r)
+ if r then
+ assert(type(r) == 'table')
+ insertrules(r)
+ end
end
elseif self.objects[event] then
for i, rule in ipairs(self.objects[event]) do