fix Lua crash (run Lua script, close Lua console, open different ROM)

This commit is contained in:
SuuperW 2020-08-03 09:29:23 -05:00
parent 166c50b6cf
commit 12ef0fe35b
1 changed files with 1 additions and 0 deletions

View File

@ -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();