Changeset

3779:fb1d2e5a2fc9

Merge with Florob
author Matthew Wild <mwild1@gmail.com>
date Sat, 18 Dec 2010 23:08:21 +0000
parents 3778:bd1845f9d5a4 (current diff) 3776:bc4f67a0658d (diff)
children 3780:791aede977da
files
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/events.lua	Sat Dec 18 21:35:42 2010 +0100
+++ b/util/events.lua	Sat Dec 18 23:08:21 2010 +0000
@@ -45,6 +45,9 @@
 		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)