Merge with Florob

Sat, 18 Dec 2010 23:08:21 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 18 Dec 2010 23:08:21 +0000
changeset 3779
fb1d2e5a2fc9
parent 3777
bd1845f9d5a4 (current diff)
parent 3778
bc4f67a0658d (diff)
child 3780
791aede977da

Merge with Florob

--- 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)

mercurial