hedgewars/uCaptions.pas
branchwebgl
changeset 8026 4a4f21070479
parent 6999 486db9d26e4b
child 8096 453917e94e55
--- a/hedgewars/uCaptions.pas	Sun Nov 11 16:53:16 2012 +0100
+++ b/hedgewars/uCaptions.pas	Sun Nov 11 17:15:19 2012 +0100
@@ -30,8 +30,6 @@
 procedure initModule;
 procedure freeModule;
 
-implementation
-uses uTextures, uRenderUtils, uVariables, uRender;
 
 type TCaptionStr = record
     Tex: PTexture;
@@ -42,8 +40,13 @@
 var
     Captions: array[TCapGroup] of TCaptionStr;
 
+implementation
+uses uTextures, uRenderUtils, uVariables, uRender;
+
 procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup);
 begin
+    if Length(s) = 0 then
+        exit;
     if Captions[Group].Text <> s then
         begin
         FreeTexture(Captions[Group].Tex);