From 5e752f0b25044da582cb2623d3193b1e1e89596d Mon Sep 17 00:00:00 2001 From: bjorn Date: Wed, 23 Mar 2022 23:16:34 -0700 Subject: [PATCH] Fix error when passing objects as thread arguments; --- src/api/api.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/api/api.c b/src/api/api.c index e5e4a2bb..e1ac6aa8 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -230,8 +230,7 @@ void _luax_pushtype(lua_State* L, const char* type, uint64_t hash, void* object) // Allocate userdata Proxy* p = (Proxy*) lua_newuserdata(L, sizeof(Proxy)); - luaL_getmetatable(L, type); - lovrAssert(lua_istable(L, -1), "Unknown type '%s' (maybe its module needs to be required)", type); + luaL_newmetatable(L, type); lua_setmetatable(L, -2); lovrRetain(object); p->object = object;