diff --git a/src/deh_lua.c b/src/deh_lua.c index f131617c6..b3ad0f1c5 100644 --- a/src/deh_lua.c +++ b/src/deh_lua.c @@ -41,6 +41,11 @@ static inline int lib_freeslot(lua_State *L) if (!lua_lumploading) return luaL_error(L, "This function cannot be called from within a hook or coroutine!"); + if (!deh_loaded) + initfreeslots(); + + deh_loaded = true; + while (n-- > 0) { s = Z_StrDup(luaL_checkstring(L,1));