# HG changeset patch # User unc0rr # Date 1235929004 0 # Node ID fa04a27005c37f4e2f19aa8f7693487d07818acc # Parent b3b07f16a70dec45e4e23db0bd065e500fd7cdc9 Fix crash when explosion is outside of the map (check was lost while refactoring) diff -r b3b07f16a70d -r fa04a27005c3 hedgewars/uLandTexture.pas --- a/hedgewars/uLandTexture.pas Sun Mar 01 17:31:09 2009 +0000 +++ b/hedgewars/uLandTexture.pas Sun Mar 01 17:36:44 2009 +0000 @@ -52,6 +52,7 @@ procedure UpdateLandTexture(X, Width, Y, Height: LongInt); var tx, ty: Longword; begin +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);