aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/CrashHandler.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-02-03 19:44:01 -0500
committerMichael <[email protected]>2017-02-03 19:44:01 -0500
commit318fef283e57221349eb6412db63d63399f4fb86 (patch)
treefb5850eebc36800909516cc09f2ca89631f478fd /ShiftOS_TheReturn/CrashHandler.cs
parent7edc0f10bb79453fdc3bf885cbd21be40f7839b5 (diff)
downloadshiftos_thereturn-318fef283e57221349eb6412db63d63399f4fb86.tar.gz
shiftos_thereturn-318fef283e57221349eb6412db63d63399f4fb86.tar.bz2
shiftos_thereturn-318fef283e57221349eb6412db63d63399f4fb86.zip
Fix crash handler
Diffstat (limited to 'ShiftOS_TheReturn/CrashHandler.cs')
-rw-r--r--ShiftOS_TheReturn/CrashHandler.cs18
1 files changed, 6 insertions, 12 deletions
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();