From fa1d9816ea8e47476dc1829d766a80192cdc057d Mon Sep 17 00:00:00 2001 From: yexo Date: Sat, 13 Mar 2010 01:12:07 +0000 Subject: (svn r19396) -Fix [FS#3690] (r19351): trying to remove a too large rail station rect caused crashes --- src/station_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 &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 &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. */ -- cgit v1.2.3-54-g00ecf