[Companion] Horus simulator fixes

This commit is contained in:
Bertrand Songis
2016-12-02 19:56:41 +01:00
parent 9b3cd8eeff
commit c23ac292b7
4 changed files with 14 additions and 14 deletions
+6 -6
View File
@@ -152,19 +152,19 @@ void luaDisable()
luaState = INTERPRETER_PANIC;
}
void luaClose(lua_State * L)
void luaClose(lua_State ** L)
{
if (L) {
if (*L) {
PROTECT_LUA() {
TRACE("luaClose %p", L);
lua_close(L); // this should not panic, but we make sure anyway
TRACE("luaClose %p", *L);
lua_close(*L); // this should not panic, but we make sure anyway
}
else {
// we can only disable Lua for the rest of the session
luaDisable();
}
UNPROTECT_LUA();
L = NULL;
*L = NULL;
}
}
@@ -771,7 +771,7 @@ void luaInit()
{
TRACE("luaInit");
luaClose(lsScripts);
luaClose(&lsScripts);
if (luaState != INTERPRETER_PANIC) {
#if defined(USE_BIN_ALLOCATOR)