Diff

util/events.lua @ 6641:b44ebfe81c73

util.events: Change from nil to false to indicate adding a global wrapper
author Matthew Wild <mwild1@gmail.com>
date Tue, 28 Apr 2015 14:19:28 +0100
parent 6638:9d2b56fd6b47
child 6648:999434eb1bbf
child 6664:5466f24e51c9
line wrap: on
line diff
--- a/util/events.lua	Tue Apr 28 14:18:43 2015 +0100
+++ b/util/events.lua	Tue Apr 28 14:19:28 2015 +0100
@@ -93,7 +93,7 @@
 	end
 	local function add_wrapper(event_name, wrapper)
 		local w;
-		if event_name == nil then
+		if event_name == false then
 			w = global_wrappers;
 			if not w then
 				w = {};
@@ -110,7 +110,7 @@
 	end
 	local function remove_wrapper(event_name, wrapper)
 		local w;
-		if event_name == nil then
+		if event_name == false then
 			w = global_wrappers;
 		else
 			w = wrappers[event_name];