From 12ef0fe35bd69f490c1f7ab419fe94a249feaa4e Mon Sep 17 00:00:00 2001 From: SuuperW Date: Mon, 3 Aug 2020 09:29:23 -0500 Subject: [PATCH] fix Lua crash (run Lua script, close Lua console, open different ROM) --- src/BizHawk.Client.EmuHawk/tools/Lua/Win32LuaLibraries.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/Win32LuaLibraries.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/Win32LuaLibraries.cs index 0791b7505f..faca92024b 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/Win32LuaLibraries.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/Win32LuaLibraries.cs @@ -166,6 +166,7 @@ namespace BizHawk.Client.EmuHawk public override void Close() { RegisteredFunctions.Clear(GlobalWin.Emulator); // TODO: don't use globals + ScriptList.Clear(); FormsLibrary.DestroyAll(); _lua.Close(); _lua = new Lua();