hedgewars/uAmmos.pas
changeset 2796 7f86e7ad378b
parent 2769 82bfcc006afb
child 2818 df7ec369992b
--- a/hedgewars/uAmmos.pas	Wed Feb 10 17:15:10 2010 +0000
+++ b/hedgewars/uAmmos.pas	Wed Feb 10 17:31:12 2010 +0000
@@ -372,7 +372,8 @@
 procedure free_uAmmos;
 var i: LongWord;
 begin
-	for i:= 0 to Pred(StoreCnt) do Dispose(StoresList[i]);
+	if StoreCnt > 0 then
+		for i:= 0 to Pred(StoreCnt) do Dispose(StoresList[i]);
 	StoreCnt:= 0
 end;