diff --git a/BizHawk.Client.EmuHawk/tools/ToolManager.cs b/BizHawk.Client.EmuHawk/tools/ToolManager.cs index 243a412927..aedc964119 100644 --- a/BizHawk.Client.EmuHawk/tools/ToolManager.cs +++ b/BizHawk.Client.EmuHawk/tools/ToolManager.cs @@ -427,7 +427,10 @@ namespace BizHawk.Client.EmuHawk foreach (var tool in _tools) { - tool.NewUpdate(ToolFormUpdateType.PreFrame); + if (!tool.IsDisposed) + { + tool.NewUpdate(ToolFormUpdateType.PreFrame); + } } } @@ -445,7 +448,10 @@ namespace BizHawk.Client.EmuHawk foreach (var tool in _tools) { - tool.NewUpdate(ToolFormUpdateType.PostFrame); + if (!tool.IsDisposed) + { + tool.NewUpdate(ToolFormUpdateType.PostFrame); + } } } diff --git a/BizHawk.Client.EmuHawk/tools/TraceLogger.cs b/BizHawk.Client.EmuHawk/tools/TraceLogger.cs index 27e95c9c3d..45fac3a489 100644 --- a/BizHawk.Client.EmuHawk/tools/TraceLogger.cs +++ b/BizHawk.Client.EmuHawk/tools/TraceLogger.cs @@ -62,7 +62,12 @@ namespace BizHawk.Client.EmuHawk TraceView.QueryItemText += TraceView_QueryItemText; TraceView.VirtualMode = true; - Closing += (o, e) => SaveConfigSettings(); + Closing += (o, e) => + { + SaveConfigSettings(); + Tracer.Sink = null; + CloseFile(); + }; MaxLines = 10000; FileSizeCap = 150; // make 1 frame of tracelog for n64/psx fit in