diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 99bb0aacfc..eecf047869 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1009,11 +1009,11 @@ void UpdateTownCargoes(Town *t) t->cargo_produced = 0; const TileArea &area = t->cargo_accepted.GetArea(); - if (area.tile == INVALID_TILE) return; - - /* Update acceptance for each grid square. */ - TILE_AREA_LOOP_STEP(tile, area, AcceptanceMatrix::GRID) { - UpdateTownCargoesSingleGridArea(t, tile, false); + if (area.tile != INVALID_TILE) { + /* Update acceptance for each grid square. */ + TILE_AREA_LOOP_STEP(tile, area, AcceptanceMatrix::GRID) { + UpdateTownCargoesSingleGridArea(t, tile, false); + } } /* Update the total acceptance. */