# HG changeset patch # User nemo # Date 1312061027 14400 # Node ID c047e70c53f4e0ba50b09c8152eed690a39b3db0 # Parent d3b9c4263cb73d1aebe27e3f6b0d27483e2e6680 add nil check diff -r d3b9c4263cb7 -r c047e70c53f4 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sat Jul 30 15:36:11 2011 -0400 +++ b/hedgewars/uGears.pas Sat Jul 30 17:23:47 2011 -0400 @@ -914,7 +914,7 @@ CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State and not gstAttacked; if delay2 = 0 then begin - if CurrentHedgehog^.Gear^.State and gstAttacked = 0 then SweepDirty; + if (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.State and gstAttacked = 0) then SweepDirty; CheckNoDamage; AliveCount:= 0; // shorter version of check for win to allow typical step activity to proceed for i:= 0 to Pred(ClansCount) do