summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2018-03-05 22:57:49 +0000
committerpeter1138 <peter1138@openttd.org>2018-03-05 22:57:49 +0000
commit50fb460203b52a93f1892d8c35955087d11193b4 (patch)
tree36de3bf38ff8bd5ce228f3e8b7fbc2a6d0c2a86d
parent86829c54c447a1c7d8176b63cce8f35184098e15 (diff)
downloadopenttd-50fb460203b52a93f1892d8c35955087d11193b4.tar.xz
(svn r27973) -Fix: [FS#6662] Avoid tile operations outside map border when building lock.
-rw-r--r--src/water_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index edce4cda5..6b11e7e64 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -73,7 +73,7 @@ static const uint8 _flood_from_dirs[] = {
*/
static inline void MarkTileDirtyIfCanalOrRiver(TileIndex tile)
{
- if (IsTileType(tile, MP_WATER) && (IsCanal(tile) || IsRiver(tile))) MarkTileDirtyByTile(tile);
+ if (IsValidTile(tile) && IsTileType(tile, MP_WATER) && (IsCanal(tile) || IsRiver(tile))) MarkTileDirtyByTile(tile);
}
/**