summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);
}
/**