Fix crash when firing portal gun at low quality graphics
authorWuzzy <Wuzzy2@mail.ru>
Tue, 17 Apr 2018 20:10:10 +0200
changeset 13328 2489c36c61b7
parent 13327 817e1890ee66
child 13329 e8801220c13f
Fix crash when firing portal gun at low quality graphics
ChangeLog.txt
hedgewars/uGearsRender.pas
--- a/ChangeLog.txt	Tue Apr 17 00:37:15 2018 +0200
+++ b/ChangeLog.txt	Tue Apr 17 20:10:10 2018 +0200
@@ -1,5 +1,8 @@
 + features
 * bugfixes
+====================== 0.9.24.1 =====================
+ * Fix crash when portable portal device is fired at reduced graphics quality
+
 ====================== 0.9.24 ======================
 Game:
  + New weapon: Minigun
--- 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;