# HG changeset patch # User nemo # Date 1257826975 0 # Node ID 07b0cc91256c124918127a4fffa68f0e5d180a9f # Parent 8c00c1ee6cac8f4ae9da660aa46b21a80cc640e0 Add check for nil gear diff -r 8c00c1ee6cac -r 07b0cc91256c hedgewars/uGears.pas --- a/hedgewars/uGears.pas Tue Nov 10 04:07:08 2009 +0000 +++ b/hedgewars/uGears.pas Tue Nov 10 04:22:55 2009 +0000 @@ -629,7 +629,8 @@ // reset to default zoom //ZoomValue:= ZoomDefault; with CurrentHedgehog^ do - if ((Gear^.State and gstAttacked) = 0) + if (Gear <> nil) + and ((Gear^.State and gstAttacked) = 0) and (MultiShootAttacks > 0) then OnUsedAmmo(CurrentHedgehog^); ResetUtilities;