hedgewars/uAI.pas
changeset 11538 00860966354d
parent 11532 bf86c6cb9341
child 11608 ed70d59479d7
--- a/hedgewars/uAI.pas	Sun Feb 07 18:29:34 2016 +0100
+++ b/hedgewars/uAI.pas	Mon Feb 08 14:58:36 2016 +0300
@@ -52,10 +52,11 @@
     ThinkThread:= nil;
     SDL_UnlockMutex(ThreadLock);
 
-    with CurrentHedgehog^ do
-        if Gear <> nil then
-            if BotLevel <> 0 then
-                StopMessages(Gear^.Message);
+    if CurrentHedgehog <> nil then
+        with CurrentHedgehog^ do
+            if Gear <> nil then
+                if BotLevel <> 0 then
+                    StopMessages(Gear^.Message);
 
     BestActions.Count:= 0;
     BestActions.Pos:= 0