hedgewars/uCaptions.pas
changeset 10015 4feced261c68
parent 9998 736015b847e3
parent 9127 e350500c4edb
child 10105 8c5fa1d15bd5
--- a/hedgewars/uCaptions.pas	Sun Jan 19 00:18:28 2014 +0400
+++ b/hedgewars/uCaptions.pas	Tue Jan 21 22:38:13 2014 +0100
@@ -15,7 +15,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
- 
+
 {$INCLUDE "options.inc"}
 
 unit uCaptions;
@@ -45,12 +45,14 @@
 procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup);
 begin
     if cOnlyStats then exit;
+    if Length(s) = 0 then
+        exit;
     if Captions[Group].Text <> s then
         begin
         FreeTexture(Captions[Group].Tex);
         Captions[Group].Tex:= nil
         end;
-    
+
     if Captions[Group].Tex = nil then
         begin
         Captions[Group].Color:= Color;