summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-03-13 01:12:07 +0000
committeryexo <yexo@openttd.org>2010-03-13 01:12:07 +0000
commitfa1d9816ea8e47476dc1829d766a80192cdc057d (patch)
treee8366fbcb8e5ea0e8154d3cf5c6dc6f16191382f /src
parentdfa528d058e5499558e7fd8dca3b292851f7625a (diff)
downloadopenttd-fa1d9816ea8e47476dc1829d766a80192cdc057d.tar.xz
(svn r19396) -Fix [FS#3690] (r19351): trying to remove a too large rail station rect caused crashes
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index a6452151c..abce3f14a 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1416,6 +1416,7 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected
DoClearSquare(tile);
if (keep_rail) MakeRailNormal(tile, owner, TrackToTrackBits(track), rt);
+ st->rect.AfterRemoveTile(st, tile);
AddTrackToSignalBuffer(tile, track, owner);
YapfNotifyTrackLayoutChange(tile, track);
@@ -1442,7 +1443,6 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected
for (T **stp = affected_stations.Begin(); stp != affected_stations.End(); stp++) {
T *st = *stp;
- st->rect.AfterRemoveRect(st, ta);
/* now we need to make the "spanned" area of the railway station smaller
* if we deleted something at the edges.
* we also need to adjust train_tile. */