From 9a749bc628747c148394314a97fdeae6e032dc0b Mon Sep 17 00:00:00 2001 From: dartraiden Date: Sat, 3 Apr 2021 15:36:24 +0300 Subject: liblua: pick up Miranda-specific commits --- libs/liblua/src/lstate.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libs/liblua/src/lstate.c') diff --git a/libs/liblua/src/lstate.c b/libs/liblua/src/lstate.c index c5e3b437f1..0af817a0d5 100644 --- a/libs/liblua/src/lstate.c +++ b/libs/liblua/src/lstate.c @@ -408,6 +408,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); -- cgit v1.2.3