Fill in the lost unref call. Thanks Sadrul.
authorRui Guo <firemeteor.guo@gmail.com>
Fri, 12 Jun 2009 03:39:55 +0000 (12 11:39 +0800)
committerRui Guo <firemeteor.guo@gmail.com>
Fri, 12 Jun 2009 03:39:55 +0000 (12 11:39 +0800)
src/lua.c

index 9befa82..8a9c527 100644 (file)
--- a/src/lua.c
+++ b/src/lua.c
@@ -1159,6 +1159,7 @@ LuaUnRegEvent(lua_State *L)
     }
   else
     {
+      LuaHRef(L, (lua_handler)l->handler, 0);
       LuaFreeHandler(((lua_handler)&(l->handler)));
       unregister_listener(l);
       lua_pushboolean(L, 1);