--- 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);