--- 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.