aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ShiftOS.WinForms/Oobe.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/ShiftOS.WinForms/Oobe.cs b/ShiftOS.WinForms/Oobe.cs
index 98aaebd..8eef34a 100644
--- a/ShiftOS.WinForms/Oobe.cs
+++ b/ShiftOS.WinForms/Oobe.cs
@@ -210,12 +210,13 @@ namespace ShiftOS.WinForms
SaveSystem.SaveGame();
Thread.Sleep(3000);
- this.Invoke(new Action(() =>
- {
+ try {
TutorialManager.StartTutorial();
- }));
- TutorialManager.StartTutorial();
- this.Close();
+ } catch (Exception e) {
+ TextType("An error has occoured while starting the tutorial");
+ TextType(e.ToString());
+ }
+ //this.Close(); // This has been commented out because the form closes when the error appears. Uncomment this if no more errors appear
}
catch(Exception e)
{
@@ -368,7 +369,9 @@ namespace ShiftOS.WinForms
Shiftorium.Silent = false;
foreach(var frm in AppearanceManager.OpenForms)
{
- frm.Close();
+ (frm as Form).Invoke(new Action(() => {
+ frm.Close();
+ }));
}
TerminalBackend.CommandProcessed += (cmd, args) =>