From 0fa2ccebc95818214a7eb763affbb8e593b02664 Mon Sep 17 00:00:00 2001 From: Charlie Kindel Date: Sat, 23 May 2020 17:30:43 -0600 Subject: [PATCH] short term fix to #520 --- Terminal.Gui/Core.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Terminal.Gui/Core.cs b/Terminal.Gui/Core.cs index fa0b41354..6079aa16f 100644 --- a/Terminal.Gui/Core.cs +++ b/Terminal.Gui/Core.cs @@ -2404,6 +2404,7 @@ namespace Terminal.Gui { throw new ArgumentNullException (nameof (runState)); runState.Dispose (); + runState = null; } /// @@ -2411,6 +2412,15 @@ namespace Terminal.Gui { /// public static void Shutdown () { + foreach (var t in toplevels) { + t.Running = false; + } + toplevels.Clear (); + Current = null; + CurrentView = null; + Top = null; + MainLoop = null; + Driver.End (); _initialized = false; }