hedgewars/HHHandlers.inc
changeset 2115 1c9a8081aef6
parent 2056 ed8c83f1e4b0
child 2136 3b19c7874a45
--- a/hedgewars/HHHandlers.inc	Sun May 24 19:45:20 2009 +0000
+++ b/hedgewars/HHHandlers.inc	Sun May 24 19:49:10 2009 +0000
@@ -197,9 +197,12 @@
         if not (SpeechText = '') then
             begin
             tmpGear:= AddVisualGear(0, 0, vgtSpeechBubble);
-            tmpGear^.Text:= SpeechText;
-            tmpGear^.Hedgehog:= Gear^.Hedgehog;
-            tmpGear^.FrameTicks:= SpeechType;
+            if tmpGear <> nil then
+               begin
+               tmpGear^.Text:= SpeechText;
+               tmpGear^.Hedgehog:= Gear^.Hedgehog;
+               tmpGear^.FrameTicks:= SpeechType;
+               end;
             SpeechText:= ''
             end;