summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-01-23 16:38:09 +0000
committerfrosch <frosch@openttd.org>2010-01-23 16:38:09 +0000
commit4034f249dbf830cb21cc76cffb6cc50e0e84379d (patch)
treeb6413ade663e6e1adb89b5ecbe1a5daaea7b2b61 /src
parent9e106dca816b6ad0e6ce1d6f163504fe0d8e3eee (diff)
downloadopenttd-4034f249dbf830cb21cc76cffb6cc50e0e84379d.tar.xz
(svn r18897) -Fix: Land area information read the stationspec also for non-rail-stationtiles, which is no longer valid since r18876.
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 6b5163c8b..215bb5b1a 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2521,15 +2521,17 @@ static void GetTileDesc_Station(TileIndex tile, TileDesc *td)
}
td->build_date = BaseStation::GetByTile(tile)->build_date;
- const StationSpec *spec = GetStationSpec(tile);
+ if (HasStationTileRail(tile)) {
+ const StationSpec *spec = GetStationSpec(tile);
- if (spec != NULL) {
- td->station_class = GetStationClassName(spec->sclass);
- td->station_name = spec->name;
+ if (spec != NULL) {
+ td->station_class = GetStationClassName(spec->sclass);
+ td->station_name = spec->name;
- if (spec->grffile != NULL) {
- const GRFConfig *gc = GetGRFConfig(spec->grffile->grfid);
- td->grf = gc->name;
+ if (spec->grffile != NULL) {
+ const GRFConfig *gc = GetGRFConfig(spec->grffile->grfid);
+ td->grf = gc->name;
+ }
}
}