hedgewars/uCaptions.pas
changeset 6383 c34a8b98d78c
parent 6382 0e76c5cd4250
child 6394 f0a9042e7387
--- a/hedgewars/uCaptions.pas	Tue Nov 15 02:02:08 2011 +0100
+++ b/hedgewars/uCaptions.pas	Mon Nov 14 22:38:24 2011 -0500
@@ -71,7 +71,8 @@
 for Group:= Low(TCapGroup) to High(TCapGroup) do
     begin
     FreeTexture(Captions[Group].Tex);
-    Captions[Group].Tex:= RenderStringTex(Captions[Group].Text, Captions[Group].Color, fntBig)
+    if Captions[Group].Text <> '' then
+        Captions[Group].Tex:= RenderStringTex(Captions[Group].Text, Captions[Group].Color, fntBig)
     end
 end;
 
@@ -108,8 +109,7 @@
 end;
 
 procedure freeModule;
-var
-    group: TCapGroup;
+var group: TCapGroup;
 begin
     for group:= Low(TCapGroup) to High(TCapGroup) do
         begin