hedgewars/uCommandHandlers.pas
changeset 13077 c213645ff848
parent 13039 aed4b25ff242
child 13107 7b3bc9a4dfb9
--- a/hedgewars/uCommandHandlers.pas	Fri Mar 02 19:44:09 2018 +0100
+++ b/hedgewars/uCommandHandlers.pas	Sun Mar 04 00:13:38 2018 +0100
@@ -49,14 +49,15 @@
 procedure chQuit(var s: shortstring);
 begin
     s:= s; // avoid compiler hint
-    if (GameState = gsGame) or (GameState = gsChat) then
-        begin
-        prevGState:= GameState;
+    if (GameState = gsGame) then
+    begin
+        isInChatMode:= false;
         GameState:= gsConfirm;
-        end
-    else
+    end
+    else begin
         if GameState = gsConfirm then
-            GameState:= prevGState;
+            GameState:= gsGame;
+    end;
 
     updateCursorVisibility;
 end;