diff options
author | michi_cc <michi_cc@openttd.org> | 2010-07-16 19:02:59 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2010-07-16 19:02:59 +0000 |
commit | 2a3ec78d9f35ad788dcaeab306f355d2e496c16d (patch) | |
tree | 07ff22d827fc7f060fda77149fda3b9afc979bd0 /src/newgrf_railtype.cpp | |
parent | e809c05099b09bab8f23a4307e0088247478770c (diff) | |
download | openttd-2a3ec78d9f35ad788dcaeab306f355d2e496c16d.tar.xz |
(svn r20165) -Feature: [NewGRF] Information (var 4A) about the current railtype a train is on.
Diffstat (limited to 'src/newgrf_railtype.cpp')
-rw-r--r-- | src/newgrf_railtype.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_railtype.cpp b/src/newgrf_railtype.cpp index 114f31b7c..a0d66ec03 100644 --- a/src/newgrf_railtype.cpp +++ b/src/newgrf_railtype.cpp @@ -110,7 +110,7 @@ SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSp uint8 GetReverseRailTypeTranslation(RailType railtype, const GRFFile *grffile) { /* No rail type table present, return rail type as-is */ - if (grffile->railtype_max == 0) return railtype; + if (grffile == NULL || grffile->railtype_max == 0) return railtype; /* Look for a matching rail type label in the table */ RailTypeLabel label = GetRailTypeInfo(railtype)->label; |