wtf
authorunc0rr
Tue, 23 Mar 2010 16:53:45 +0000
changeset 3052 1d60306f6b34
parent 3051 e39d8fa0e063
child 3053 55a7e3a896ef
wtf
hedgewars/hwengine.pas
hedgewars/uAmmos.pas
--- a/hedgewars/hwengine.pas	Tue Mar 23 16:50:13 2010 +0000
+++ b/hedgewars/hwengine.pas	Tue Mar 23 16:53:45 2010 +0000
@@ -159,10 +159,8 @@
     ControllerClose();
     SendKB();
     CloseIPC();
-    freeEverything();
     TTF_Quit();
     SDL_Quit();
-    exit();
 end;
 
 ///////////////////
@@ -204,8 +202,6 @@
         end else SDL_Delay(1);
         if isTerminated = false then IPCCheckSock();
     until isTerminated;
-
-    exit();
 end;
 
 /////////////////////////
@@ -307,7 +303,6 @@
 
     MainLoop();
     OnDestroy();
-    exit();
 end;
 
 procedure initEverything;
@@ -578,6 +573,7 @@
     else if GameType = gmtSyntax then DisplayUsage()
     else Game();
     
+    freeEverything;
     if GameType = gmtSyntax then
         ExitCode:= 1
     else
--- a/hedgewars/uAmmos.pas	Tue Mar 23 16:50:13 2010 +0000
+++ b/hedgewars/uAmmos.pas	Tue Mar 23 16:53:45 2010 +0000
@@ -378,8 +378,7 @@
 var i: LongWord;
 begin
     if StoreCnt > 0 then
-        for i:= 0 to Pred(StoreCnt) do Dispose(StoresList[i]);
-    StoreCnt:= 0
+        for i:= 0 to Pred(StoreCnt) do Dispose(StoresList[i])
 end;
 
 end.