Fix typo leading to crashes
authorunc0rr
Fri, 25 Apr 2014 23:17:49 +0400
changeset 10229 5d38aaff5564
parent 10228 947cadb40bc5
child 10230 361d36ec5181
Fix typo leading to crashes
hedgewars/uStore.pas
--- a/hedgewars/uStore.pas	Fri Apr 25 16:52:04 2014 +0400
+++ b/hedgewars/uStore.pas	Fri Apr 25 23:17:49 2014 +0400
@@ -115,6 +115,7 @@
 clr.g:= (Color shr 8) and $FF;
 clr.b:= Color and $FF;
 tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, s, clr);
+SDLTry(tmpsurf <> nil, true);
 tmpsurf:= doSurfaceConversion(tmpsurf);
 SDLTry(tmpsurf <> nil, true);
 SDL_UpperBlit(tmpsurf, nil, Surface, @finalRect);
@@ -1249,7 +1250,7 @@
 // make sure there is a caption as well as a sub caption - description is optional
 if length(caption) = 0 then
     caption:= ansistring('???');
-if length(caption) = 0 then
+if length(subcaption) = 0 then
     subcaption:= ansistring(_S' ');
 
 font:= CheckCJKFont(caption,fnt16);