hedgewars/uStore.pas
changeset 13990 b9b1d74b7fef
parent 13980 3183c4dc6e53
child 14191 a1178e1b57a6
--- a/hedgewars/uStore.pas	Fri Oct 26 17:51:43 2018 +0200
+++ b/hedgewars/uStore.pas	Fri Oct 26 19:53:07 2018 +0200
@@ -534,6 +534,7 @@
     for i:= Low(CountTexz) to High(CountTexz) do
         begin
         tmpsurf:= TTF_RenderUTF8_Blended(Fontz[CheckCJKFont(trmsg[sidAmmoCount],fnt16)].Handle, Str2PChar(Format(shortstring(trmsg[sidAmmoCount]), IntToStr(i))), cWhiteColorChannels);
+        if checkFails(tmpsurf <> nil,'Number texture creation for ammo type #' + intToStr(ord(ai)) + ' failed!',true) then exit;
         tmpsurf:= doSurfaceConversion(tmpsurf);
         FreeAndNilTexture(CountTexz[i]);
         CountTexz[i]:= Surface2Tex(tmpsurf, false);