# HG changeset patch
# User unc0rr
# Date 1540576387 -7200
# Node ID b9b1d74b7fefd5fb80eaf3f04a6fc99ccf9bfa0e
# Parent  a8ffc92a0982d72de3092f1c5921861524f6c9b5
Fix lack of message and segfault when number texture creation fails

diff -r a8ffc92a0982 -r b9b1d74b7fef hedgewars/uStore.pas
--- 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);