summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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 ae9727c4c..94d03b302 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2863,7 +2863,7 @@ void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, Ro
SpriteID img = t->ground.sprite;
RailTrackOffset overlay_offset;
- if (rti->UsesOverlay() && SplitGroundSpriteForOverlay(NULL, &img, &overlay_offset)) {
+ if (rti != NULL && rti->UsesOverlay() && SplitGroundSpriteForOverlay(NULL, &img, &overlay_offset)) {
SpriteID ground = GetCustomRailSprite(rti, INVALID_TILE, RTSG_GROUND);
DrawSprite(img, PAL_NONE, x, y);
DrawSprite(ground + overlay_offset, PAL_NONE, x, y);