Fix one more crasher in early freeEverything call
authorunc0rr
Mon, 08 Feb 2016 14:58:36 +0300
changeset 11538 00860966354d
parent 11537 de40095f3327
child 11539 c22d292e7266
Fix one more crasher in early freeEverything call
hedgewars/uAI.pas
--- 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