summaryrefslogtreecommitdiff
path: root/libs/liblua/src
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2020-12-03 22:11:17 +0300
committerdartraiden <wowemuh@gmail.com>2020-12-03 22:11:32 +0300
commitf64dfc75a6ffe43c9f425d353be761b32b7e4653 (patch)
treea8a09f927494681f382a9b0e586d4234c62476db /libs/liblua/src
parentb2a67a796656f20dfae0ecdf7c2870d3ece927b4 (diff)
liblua: pick up Miranda-specific commits
Diffstat (limited to 'libs/liblua/src')
-rw-r--r--libs/liblua/src/lstate.c3
1 files changed, 3 insertions, 0 deletions
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);