hedgewars/uGearsList.pas
changeset 10641 802589828f99
parent 10639 992863acb2b7
child 10643 8d6063af793a
--- a/hedgewars/uGearsList.pas	Mon Dec 08 17:43:27 2014 +0100
+++ b/hedgewars/uGearsList.pas	Mon Dec 08 14:52:56 2014 -0500
@@ -698,7 +698,7 @@
 
         // should be not CurrentHedgehog, but hedgehog of the last gear which caused damage to this hog
         // same stand for CheckHHDamage
-        if (Gear^.LastDamage <> nil) then
+        if (Gear^.LastDamage <> nil) and (CurrentHedgehog <> nil) then
             uStats.HedgehogDamaged(Gear, Gear^.LastDamage, 0, true)
         else if CurrentHedgehog <> nil then
             uStats.HedgehogDamaged(Gear, CurrentHedgehog, 0, true);