--- a/hedgewars/uVisualGears.pas Thu Jun 17 11:42:23 2010 -0400
+++ b/hedgewars/uVisualGears.pas Thu Jun 17 19:57:51 2010 +0200
@@ -327,14 +327,15 @@
procedure DeleteVisualGear(Gear: PVisualGear);
begin
-if Gear^.Tex <> nil then
- FreeTexture(Gear^.Tex);
+ if Gear^.Tex <> nil then
+ FreeTexture(Gear^.Tex);
+ Gear^.Tex:= nil;
-if Gear^.NextGear <> nil then Gear^.NextGear^.PrevGear:= Gear^.PrevGear;
-if Gear^.PrevGear <> nil then Gear^.PrevGear^.NextGear:= Gear^.NextGear
- else VisualGearsList:= Gear^.NextGear;
+ if Gear^.NextGear <> nil then Gear^.NextGear^.PrevGear:= Gear^.PrevGear;
+ if Gear^.PrevGear <> nil then Gear^.PrevGear^.NextGear:= Gear^.NextGear
+ else VisualGearsList:= Gear^.NextGear;
-Dispose(Gear)
+ Dispose(Gear);
end;
procedure ProcessVisualGears(Steps: Longword);