summarylogtreecommitdiffstats
path: root/lua-port.patch
blob: b72f7c48769906588d28070b9fdfca1904e9fb74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git Source/Core/Lua/LuaEventListener.cpp Source/Core/Lua/LuaEventListener.cpp
index 23e74e5..ab91b52 100644
--- Source/Core/Lua/LuaEventListener.cpp
+++ Source/Core/Lua/LuaEventListener.cpp
@@ -79,7 +79,7 @@ LuaEventListener::LuaEventListener(lua_State* L, int narg)
 
 LuaEventListener::~LuaEventListener()
 {
-	lua_unref(Interpreter::GetLuaState(), luaFuncRef);
+    luaL_unref(Interpreter::GetLuaState(), LUA_REGISTRYINDEX, luaFuncRef);
 }
 
 /// Process the incoming Event