From 3d805a3541c3fff7a536c9f1abcedaa803884257 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 4 Feb 2017 10:45:32 -0600 Subject: [PATCH] null check for previous commit --- BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs b/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs index 3f12f1e767..16b33e8ff1 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs @@ -70,7 +70,10 @@ namespace BizHawk.Client.EmuHawk LuaImp.GuiLibrary.DrawFinish(); foreach (var lua in _luaList) { - lua.Thread.Dispose(); + if (lua.Thread != null) + { + lua.Thread.Dispose(); + } } CloseLua(); } @@ -541,8 +544,7 @@ namespace BizHawk.Client.EmuHawk } }, () => { - lf.State = LuaFile.RunState.Disabled; - lf.Thread = null; + lf.Stop(); }); } catch (Exception ex)