aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/TerminalBackend.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-03-11 10:28:16 -0500
committerMichael <[email protected]>2017-03-11 10:28:16 -0500
commit01420ff329ab1819f1be1ea444c46785328b44cb (patch)
tree1766c39afd9e1c61dcc1fb5b2411e195fb0446de /ShiftOS_TheReturn/TerminalBackend.cs
parentdad61e325cfcd1ce12ae6f29d3778d1c919c6ab3 (diff)
downloadshiftos_thereturn-01420ff329ab1819f1be1ea444c46785328b44cb.tar.gz
shiftos_thereturn-01420ff329ab1819f1be1ea444c46785328b44cb.tar.bz2
shiftos_thereturn-01420ff329ab1819f1be1ea444c46785328b44cb.zip
fix mud.connect deadlock
Diffstat (limited to 'ShiftOS_TheReturn/TerminalBackend.cs')
-rw-r--r--ShiftOS_TheReturn/TerminalBackend.cs61
1 files changed, 32 insertions, 29 deletions
diff --git a/ShiftOS_TheReturn/TerminalBackend.cs b/ShiftOS_TheReturn/TerminalBackend.cs
index c7852f1..e4bad33 100644
--- a/ShiftOS_TheReturn/TerminalBackend.cs
+++ b/ShiftOS_TheReturn/TerminalBackend.cs
@@ -339,35 +339,38 @@ namespace ShiftOS.Engine
public static void PrintPrompt()
{
- ConsoleEx.BackgroundColor = SkinEngine.LoadedSkin.TerminalBackColorCC;
- ConsoleEx.Italic = false;
- ConsoleEx.Underline = false;
-
- ConsoleEx.ForegroundColor = ConsoleColor.Magenta;
- ConsoleEx.Bold = true;
-
- Console.Write(SaveSystem.CurrentSave.Username);
- ConsoleEx.Bold = false;
- ConsoleEx.ForegroundColor = ConsoleColor.Gray;
- Console.Write("@");
- ConsoleEx.Italic = true;
- ConsoleEx.Bold = true;
- ConsoleEx.ForegroundColor = ConsoleColor.Yellow;
- Console.Write(SaveSystem.CurrentSave.SystemName);
- ConsoleEx.Italic = false;
- ConsoleEx.Bold = false;
- ConsoleEx.ForegroundColor = ConsoleColor.Gray;
- Console.Write(":~");
- Console.ForegroundColor = ConsoleColor.White;
- ConsoleEx.Italic = true;
- if (KernelWatchdog.InKernelMode == true)
- Console.Write("#");
- else
- Console.Write("$");
- ConsoleEx.Italic = false;
- ConsoleEx.Bold = false;
- ConsoleEx.ForegroundColor = SkinEngine.LoadedSkin.TerminalForeColorCC;
- Console.Write(" ");
+ if (SaveSystem.CurrentSave != null)
+ {
+ ConsoleEx.BackgroundColor = SkinEngine.LoadedSkin.TerminalBackColorCC;
+ ConsoleEx.Italic = false;
+ ConsoleEx.Underline = false;
+
+ ConsoleEx.ForegroundColor = ConsoleColor.Magenta;
+ ConsoleEx.Bold = true;
+
+ Console.Write(SaveSystem.CurrentSave.Username);
+ ConsoleEx.Bold = false;
+ ConsoleEx.ForegroundColor = ConsoleColor.Gray;
+ Console.Write("@");
+ ConsoleEx.Italic = true;
+ ConsoleEx.Bold = true;
+ ConsoleEx.ForegroundColor = ConsoleColor.Yellow;
+ Console.Write(SaveSystem.CurrentSave.SystemName);
+ ConsoleEx.Italic = false;
+ ConsoleEx.Bold = false;
+ ConsoleEx.ForegroundColor = ConsoleColor.Gray;
+ Console.Write(":~");
+ Console.ForegroundColor = ConsoleColor.White;
+ ConsoleEx.Italic = true;
+ if (KernelWatchdog.InKernelMode == true)
+ Console.Write("#");
+ else
+ Console.Write("$");
+ ConsoleEx.Italic = false;
+ ConsoleEx.Bold = false;
+ ConsoleEx.ForegroundColor = SkinEngine.LoadedSkin.TerminalForeColorCC;
+ Console.Write(" ");
+ }
}