Fix lua crash in cleanup

pull/1350/head
Levin Li 2022-02-18 10:50:25 +08:00
parent 6b856b3352
commit 318b4378a9
1 changed files with 3 additions and 0 deletions

View File

@ -266,6 +266,9 @@ static void checkTimeslice(lua_State* l, lua_Debug* /*ar*/)
// allow the script to perform cleanup
void LuaState::cleanup()
{
if (!costate)
return;
if (ioMode == Asking)
{
// Restore renderflags: