hedgewars/uVisualGearsList.pas
changeset 10634 35d059bd0932
parent 10625 125e120165aa
child 10876 d012728b89b9
--- a/hedgewars/uVisualGearsList.pas	Sun Dec 07 14:36:28 2014 -0500
+++ b/hedgewars/uVisualGearsList.pas	Mon Dec 08 09:35:14 2014 -0500
@@ -432,8 +432,7 @@
 
 procedure DeleteVisualGear(Gear: PVisualGear);
 begin
-    FreeTexture(Gear^.Tex);
-    Gear^.Tex:= nil;
+    FreeAndNilTexture(Gear^.Tex);
 
     if Gear^.NextGear <> nil then
         Gear^.NextGear^.PrevGear:= Gear^.PrevGear;