hedgewars/uGearsRender.pas
changeset 13328 2489c36c61b7
parent 13282 b13071610c07
child 13399 3d6aae2ae698
--- a/hedgewars/uGearsRender.pas	Tue Apr 17 00:37:15 2018 +0200
+++ b/hedgewars/uGearsRender.pas	Tue Apr 17 20:10:10 2018 +0200
@@ -1250,10 +1250,11 @@
                  if ((Gear^.Tag and 1) = 0) and ((GameTicks mod 4) = 0) and (not isPaused) then
                      begin
                      vg:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtDust, 1);
-                     if Gear^.Tag = 0 then
-                         vg^.Tint:= $fab02ab0
-                     else if Gear^.Tag = 2 then
-                         vg^.Tint:= $364df7b0;
+                     if vg <> nil then
+                         if Gear^.Tag = 0 then
+                             vg^.Tint:= $fab02ab0
+                         else if Gear^.Tag = 2 then
+                             vg^.Tint:= $364df7b0;
                      end;
                  end;