aboutsummaryrefslogtreecommitdiff
path: root/src/lua/common/je_lua_reference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/common/je_lua_reference.cpp')
-rw-r--r--src/lua/common/je_lua_reference.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/common/je_lua_reference.cpp b/src/lua/common/je_lua_reference.cpp
index 37ed441..72c1c3e 100644
--- a/src/lua/common/je_lua_reference.cpp
+++ b/src/lua/common/je_lua_reference.cpp
@@ -10,7 +10,9 @@ namespace JinEngine
LuaRef::LuaRef(lua_State* L, int i)
: mL(L)
{
+ // Get value.
luax_pushvalue(mL, i);
+ // Set reference.
luax_getreferencestable(L);
luax_pushvalue(mL, -2);
mIndex = luax_ref(mL, -2);