summaryrefslogtreecommitdiff
path: root/src/newgrf_station.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-23 22:16:41 +0000
committerrubidium <rubidium@openttd.org>2008-04-23 22:16:41 +0000
commitdce1b331965c660a80996230503149b28221f34c (patch)
tree3c648d4bd6e453e588d664c0eabe3c948a556f7c /src/newgrf_station.cpp
parent10ab24a5f149955f3af71ba152609a4be676b795 (diff)
downloadopenttd-dce1b331965c660a80996230503149b28221f34c.tar.xz
(svn r12857) -Fix [FS#1948]: remove the last uses of AutoPtr in the station code.
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r--src/newgrf_station.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp
index edb49515f..4f57699ab 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -676,7 +676,7 @@ int AllocateSpecToStation(const StationSpec *statspec, Station *st, bool exec)
{
uint i;
- if (statspec == NULL) return 0;
+ if (statspec == NULL || st == NULL) return 0;
/* Check if this spec has already been allocated */
for (i = 1; i < st->num_specs && i < MAX_SPECLIST; i++) {