diff options
-rw-r--r-- | libs/liblua/include/lua.hpp | 6 | ||||
-rw-r--r-- | libs/liblua/src/lstate.c | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/libs/liblua/include/lua.hpp b/libs/liblua/include/lua.hpp index ec417f5946..4030829227 100644 --- a/libs/liblua/include/lua.hpp +++ b/libs/liblua/include/lua.hpp @@ -3,7 +3,7 @@ // <<extern "C">> not supplied automatically because Lua also compiles as C++ extern "C" { -#include "lua.h" -#include "lualib.h" -#include "lauxlib.h" +#include "../src/lua.h" +#include "../src/lualib.h" +#include "../src/lauxlib.h" } diff --git a/libs/liblua/src/lstate.c b/libs/liblua/src/lstate.c index 1c7b8791da..72515da1be 100644 --- a/libs/liblua/src/lstate.c +++ b/libs/liblua/src/lstate.c @@ -403,6 +403,9 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { LUA_API void lua_close (lua_State *L) { + if (!L) + return; + lua_lock(L); L = G(L)->mainthread; /* only the main thread can be closed */ close_state(L); |