Fix crash caused by speechbubbles when restoring from save or joining already started net game
--- a/hedgewars/CCHandlers.inc Sun May 24 16:02:16 2009 +0000
+++ b/hedgewars/CCHandlers.inc Sun May 24 19:45:20 2009 +0000
@@ -406,9 +406,12 @@
if byte(s[1]) < 4 then
begin
Gear:= AddVisualGear(0, 0, vgtSpeechBubble);
- Gear^.Hedgehog:= CurrentHedgehog;
- Gear^.Text:= text;
- Gear^.FrameTicks:= byte(s[1])
+ if Gear <> nil then
+ begin
+ Gear^.Hedgehog:= CurrentHedgehog;
+ Gear^.Text:= text;
+ Gear^.FrameTicks:= byte(s[1])
+ end
end
else
begin