summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index a1fb6e2c4..96251a8fe 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1252,7 +1252,13 @@ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32
/* As the station is not yet completely finished, the station does not yet exist. */
uint16 callback = GetStationCallback(CBID_STATION_TILE_LAYOUT, platinfo, 0, statspec, NULL, tile);
- if (callback != CALLBACK_FAILED && callback < 8) SetStationGfx(tile, (callback & ~1) + axis);
+ if (callback != CALLBACK_FAILED) {
+ if (callback < 8) {
+ SetStationGfx(tile, (callback & ~1) + axis);
+ } else {
+ ErrorUnknownCallbackResult(statspec->grf_prop.grffile->grfid, CBID_STATION_TILE_LAYOUT, callback);
+ }
+ }
/* Trigger station animation -- after building? */
TriggerStationAnimation(st, tile, SAT_BUILT);