From 318fef283e57221349eb6412db63d63399f4fb86 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 3 Feb 2017 19:44:01 -0500 Subject: Fix crash handler --- ShiftOS_TheReturn/CrashHandler.cs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'ShiftOS_TheReturn/CrashHandler.cs') diff --git a/ShiftOS_TheReturn/CrashHandler.cs b/ShiftOS_TheReturn/CrashHandler.cs index 331a55a..a723136 100644 --- a/ShiftOS_TheReturn/CrashHandler.cs +++ b/ShiftOS_TheReturn/CrashHandler.cs @@ -95,20 +95,14 @@ namespace ShiftOS.Engine public static void Start(Exception e) { - if (SaveSystem.CurrentSave != null) - { - TerminalBackend.InvokeCommand("sos.save"); //save ShiftOS to disk before killing the session - } - - //Close ALL FORMS in the current session. - while (Application.OpenForms.Count != 0) - { - Application.OpenForms[0].Dispose(); - } - - //Disconnect us from the ShiftOS multi-user domain. + if(SaveSystem.CurrentSave != null) + TerminalBackend.InvokeCommand("sos.save"); + AudioManager.Kill(); ServerManager.Disconnect(); + while (Application.OpenForms.Count > 0) + Application.OpenForms[0].Close(); + //Set our global exception variable, and show the exception dialog. HandledException = e; System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); -- cgit v1.2.3