hedgewars/uTouch.pas
changeset 7105 9007531f813f
parent 7087 d2089f2ea5af
child 7185 92a045156255
--- a/hedgewars/uTouch.pas	Mon May 21 16:46:24 2012 -0400
+++ b/hedgewars/uTouch.pas	Mon May 21 22:54:34 2012 +0200
@@ -271,7 +271,7 @@
                 ParseTeamCommand('put');
                 targetted:= true;
                 end
-            else if CurAmmoGear^.AmmoType = amSwitch then
+            else if (CurAmmoGear <> nil) and (CurAmmoGear^.AmmoType = amSwitch) then
                 ParseTeamCommand('switch')
             else WriteLnToConsole(inttostr(ord(Ammoz[CurrentHedgehog^.CurAmmoType].NameId)) + ' ' + inttostr(ord(sidSwitch)));
     end;