From 12f00ee7428658254a13266a3cec7f8a693335fc Mon Sep 17 00:00:00 2001 From: Guo Rui Date: Tue, 28 Jul 2009 01:13:44 +0800 Subject: [PATCH] Correct LuaRegEvent to use broker. --- src/lua.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lua.c b/src/lua.c index 09dc95e..0157cb4 100644 --- a/src/lua.c +++ b/src/lua.c @@ -1516,7 +1516,11 @@ LuaRegEvent(lua_State *L) if (!strcmp("screen", objname)) objname = "global"; else - obj = *(char **)lua_touserdata(L, 1); + { + obj = get_broker_obj((struct broker **)lua_touserdata(L, 1)); + if (!obj) + return luaL_error(L, "Invalid object specified"); + } idx++; } -- 2.11.4.GIT