guard lua_close()

nhl_done() can be called with L == NULL.
So lua_close() should be guarded.
This commit is contained in:
SHIRAKATA Kentaro
2021-10-22 02:13:17 +09:00
parent 1f9c8b8ef9
commit 62e6b5a336

View File

@@ -1375,7 +1375,8 @@ nhl_init(void)
void
nhl_done(lua_State *L)
{
lua_close(L);
if (L)
lua_close(L);
iflags.in_lua = FALSE;
}