hedgewars/uLandGraphics.pas
changeset 15145 53342ce3f0a6
parent 14291 7a7c090f96f6
child 15146 af14c418c92f
--- a/hedgewars/uLandGraphics.pas	Fri Jun 14 22:24:59 2019 +0200
+++ b/hedgewars/uLandGraphics.pas	Sat Jun 15 01:18:40 2019 +0200
@@ -161,6 +161,7 @@
 procedure DrawPixelIce(landX, landY, pixelX, pixelY: Longint); inline;
 begin
 if ((Land[landY, landX] and lfIce) <> 0) then exit;
+if (pixelX < LeftX) or (pixelX > RightX) or (pixelY < TopY) then exit;
 if isLandscapeEdge(getPixelWeight(landX, landY)) then
     begin
     if (LandPixels[pixelY, pixelX] and AMask < 255) and (LandPixels[pixelY, pixelX] and AMask > 0) then