changeset 2796 | 7f86e7ad378b |
parent 2785 | de6406cd6b25 |
child 2806 | db6e2a4da358 |
--- a/hedgewars/uTeams.pas Wed Feb 10 17:15:10 2010 +0000 +++ b/hedgewars/uTeams.pas Wed Feb 10 17:31:12 2010 +0000 @@ -466,8 +466,11 @@ procedure free_uTeams; var i: LongWord; begin - for i:= 0 to Pred(TeamsCount) do Dispose(TeamsArray[i]); - for i:= 0 to Pred(ClansCount) do Dispose(ClansArray[i]); + 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;