# HG changeset patch # User nemo # Date 1418068376 18000 # Node ID 802589828f990554e643211f7d56be4b78a40d7f # Parent efa069762cb202db0aa013e4753f8b6878556545 HedgehogDamaged calls CurrentHedgehog diff -r efa069762cb2 -r 802589828f99 hedgewars/uGearsList.pas --- 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);