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
commit2b85217bfe7197684e22a0257cabe9b4a37cb7d6 (patch)
tree3c648d4bd6e453e588d664c0eabe3c948a556f7c /src/newgrf_station.cpp
parent7c8fe9791b3fb63a2842f45c85c8c428780a7a4e (diff)
downloadopenttd-2b85217bfe7197684e22a0257cabe9b4a37cb7d6.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++) {