--- a/hedgewars/uRenderUtils.pas Wed Jan 13 16:19:50 2016 +0100
+++ b/hedgewars/uRenderUtils.pas Sun Jan 10 00:45:13 2016 +0300
@@ -99,7 +99,8 @@
tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, PChar(s), clr);
finalRect.x:= X + cFontBorder + 2;
finalRect.y:= Y + cFontBorder;
- SDLTry(tmpsurf <> nil, 'TTF_RenderUTF8_Blended', true);
+ if SDLCheck(tmpsurf <> nil, 'TTF_RenderUTF8_Blended', true) then
+ exit;
SDL_UpperBlit(tmpsurf, @textRect, Surface, @finalRect);
SDL_FreeSurface(tmpsurf);
finalRect.x:= X;
@@ -522,9 +523,11 @@
rect.x:= edgeHeight + 1 + ((i - w) div 2);
// trying to more evenly position the text, vertically
rect.y:= edgeHeight + ((j-(numLines*h)) div 2) + line * h;
- SDLTry(tmpsurf <> nil, 'TTF_Init', true);
- SDL_UpperBlit(tmpsurf, nil, finalSurface, @rect);
- SDL_FreeSurface(tmpsurf);
+ if not SDLCheck(tmpsurf <> nil, 'TTF_RenderUTF8_Blended', true) then
+ begin
+ SDL_UpperBlit(tmpsurf, nil, finalSurface, @rect);
+ SDL_FreeSurface(tmpsurf);
+ end;
inc(line);
end;