aboutsummaryrefslogtreecommitdiffstats
path: root/util/events.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/events.lua')
-rw-r--r--util/events.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/events.lua b/util/events.lua
index 8e05072d..412acccd 100644
--- a/util/events.lua
+++ b/util/events.lua
@@ -45,6 +45,9 @@ function new()
if map then
map[handler] = nil;
handlers[event] = nil;
+ if next(map) == nil then
+ event_map[event] = nil;
+ end
end
end;
local function add_handlers(handlers)