summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-11-13 21:41:54 +0000
committerfrosch <frosch@openttd.org>2012-11-13 21:41:54 +0000
commiteb56e60e94902fc9fd6e88da874292ece021351f (patch)
tree0a24c3f7966af59b6a1940409a7af4ca855bba39
parentb518f1342c26275857b97c2593c4e7ff4734f58c (diff)
downloadopenttd-eb56e60e94902fc9fd6e88da874292ece021351f.tar.xz
(svn r24721) -Fix (r24715): Reallow building road stations.
-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);