mirror of https://github.com/bjornbytes/lovr.git
Fix error when passing objects as thread arguments;
This commit is contained in:
parent
301f7b2cc9
commit
5e752f0b25
|
@ -230,8 +230,7 @@ void _luax_pushtype(lua_State* L, const char* type, uint64_t hash, void* object)
|
||||||
|
|
||||||
// Allocate userdata
|
// Allocate userdata
|
||||||
Proxy* p = (Proxy*) lua_newuserdata(L, sizeof(Proxy));
|
Proxy* p = (Proxy*) lua_newuserdata(L, sizeof(Proxy));
|
||||||
luaL_getmetatable(L, type);
|
luaL_newmetatable(L, type);
|
||||||
lovrAssert(lua_istable(L, -1), "Unknown type '%s' (maybe its module needs to be required)", type);
|
|
||||||
lua_setmetatable(L, -2);
|
lua_setmetatable(L, -2);
|
||||||
lovrRetain(object);
|
lovrRetain(object);
|
||||||
p->object = object;
|
p->object = object;
|
||||||
|
|
Loading…
Reference in New Issue