Skip to content

Commit

Permalink
Fix shutdown crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
philmoz committed Oct 2, 2024
1 parent 2219748 commit 7b6d0d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 0 additions & 4 deletions radio/src/edgetx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1089,10 +1089,6 @@ void edgeTxClose(uint8_t shutdown)
#endif
}

#if defined(LUA)
luaClose(&lsScripts);
#endif

logsClose();

storageFlushCurrentModel();
Expand Down
4 changes: 3 additions & 1 deletion radio/src/lua/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,12 @@ void luaClose(lua_State ** L)

void luaClose()
{
luaClose(&lsScripts);
#if defined(COLORLCD)
luaClose(&lsWidgets);
extern lua_State* lsStandalone;
luaClose(&lsStandalone);
#endif
luaClose(&lsScripts);
}

void luaRegisterLibraries(lua_State * L)
Expand Down

0 comments on commit 7b6d0d7

Please sign in to comment.