Check gear for nil in /timer command handler
authorunc0rr
Sun, 16 Aug 2009 11:55:41 +0000
changeset 2313 0ffdcae7653c
parent 2312 3b59f1251ead
child 2314 953771a06c64
Check gear for nil in /timer command handler
hedgewars/CCHandlers.inc
--- a/hedgewars/CCHandlers.inc	Sat Aug 15 09:34:31 2009 +0000
+++ b/hedgewars/CCHandlers.inc	Sun Aug 16 11:55:41 2009 +0000
@@ -355,7 +355,9 @@
 
 procedure chTimer(var s: shortstring);
 begin
-if (s[0] <> #1) or (s[1] < '1') or (s[1] > '5') or (CurrentTeam = nil) then exit;
+if (s[0] <> #1) or (s[1] < '1') or (s[1] > '5')
+	or (CurrentTeam = nil)
+	or (CurrentHedgehog^.Gear = nil) then exit;
 bShowFinger:= false;
 if not CurrentTeam^.ExtDriven then SendIPC(s);
 with CurrentHedgehog^.Gear^ do