hedgewars/uTeams.pas
changeset 3051 e39d8fa0e063
parent 3045 41732f986b4f
child 3076 7e246257adaa
--- a/hedgewars/uTeams.pas	Mon Mar 22 20:57:49 2010 +0000
+++ b/hedgewars/uTeams.pas	Tue Mar 23 16:50:13 2010 +0000
@@ -474,7 +474,15 @@
 end;
 
 procedure freeModule;
+var i: LongWord;
 begin
+   if TeamsCount > 0 then
+     begin
+     for i:= 0 to Pred(TeamsCount) do Dispose(TeamsArray[i]);
+     for i:= 0 to Pred(ClansCount) do Dispose(ClansArray[i]);
+     end;
+   TeamsCount:= 0;
+   ClansCount:= 0
 end;
 
 end.