unc0rr forgot nil check here too
authornemo
Sun, 24 May 2009 19:49:10 +0000
changeset 2115 1c9a8081aef6
parent 2114 9a8ccc7bc3d8
child 2116 dec7ead2d178
unc0rr forgot nil check here too
hedgewars/HHHandlers.inc
--- 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;