hedgewars/uLandTexture.pas
changeset 11532 bf86c6cb9341
parent 11317 62287d4044e7
child 15900 128ace913837
--- a/hedgewars/uLandTexture.pas	Sun Jan 24 00:02:57 2016 +0100
+++ b/hedgewars/uLandTexture.pas	Sun Jan 31 16:07:14 2016 +0300
@@ -72,10 +72,11 @@
     if cOnlyStats then exit;
     if (Width <= 0) or (Height <= 0) then
         exit;
-    TryDo((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true);
-    TryDo(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true);
-    TryDo((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true);
-    TryDo(Y + Height <= LAND_HEIGHT, 'UpdateLandTexture: wrong Height parameter', true);
+    checkFails((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true);
+    checkFails(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true);
+    checkFails((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true);
+    checkFails(Y + Height <= LAND_HEIGHT, 'UpdateLandTexture: wrong Height parameter', true);
+    if not allOK then exit;
 
     tSize:= TEXSIZE;