hedgewars/uMobile.pas
changeset 4362 8dae325dc625
parent 4034 634a8c8682de
child 4436 94c948a92759
--- a/hedgewars/uMobile.pas	Sun Nov 28 01:58:43 2010 +0100
+++ b/hedgewars/uMobile.pas	Sun Nov 28 23:49:09 2010 +0100
@@ -77,7 +77,9 @@
 procedure perfExt_AmmoUpdate; // don't inline
 begin
 {$IFDEF IPHONEOS}
-    if (CurrentTeam^.ExtDriven) or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0) then
+    if (CurrentTeam = nil) or
+       (CurrentTeam^.ExtDriven) or
+       (CurrentTeam^.Hedgehogs[0].BotLevel <> 0) then
         exit(); // the other way around throws a compiler error
     updateVisualsNewTurn();
 {$ENDIF}