hedgewars/uCaptions.pas
changeset 6379 ef4288298e57
parent 6377 3ce19204b14b
child 6382 0e76c5cd4250
--- a/hedgewars/uCaptions.pas	Mon Nov 14 23:46:23 2011 +0200
+++ b/hedgewars/uCaptions.pas	Mon Nov 14 17:56:44 2011 -0500
@@ -44,7 +44,7 @@
 
 procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup);
 begin
-    if (Captions[Group].Tex <> nil) and (Captions[Group].Text <> s) then
+    if Captions[Group].Text <> s then
         begin
         FreeTexture(Captions[Group].Tex);
         Captions[Group].Tex:= nil
@@ -69,7 +69,7 @@
 begin
 for Group:= Low(TCapGroup) to High(TCapGroup) do
     begin
-    if Captions[Group].Tex <> nil then FreeTexture(Captions[Group].Tex);
+    FreeTexture(Captions[Group].Tex);
     Captions[Group].Tex:= RenderStringTex(Captions[Group].Text, Captions[Group].Color, fntBig)
     end
 end;