summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-18 19:32:16 +0000
committersmatz <smatz@openttd.org>2009-05-18 19:32:16 +0000
commit70aab8bf0487ef506afbeaa6cb8e46309387df84 (patch)
treee0c2fdd130c4c93d249ca7ecb2860e454d6b4e7f /src/vehicle.cpp
parenta0ff6363e6429fded7bd39adacd14a191ef00526 (diff)
downloadopenttd-70aab8bf0487ef506afbeaa6cb8e46309387df84.tar.xz
(svn r16354) -Codechange: use 'new' pool accessors and methods for Engine too
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 94842b383..e449a03f5 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1747,8 +1747,8 @@ void VehiclesYearlyLoop()
*/
bool CanVehicleUseStation(EngineID engine_type, const Station *st)
{
- assert(IsEngineIndex(engine_type));
- const Engine *e = Engine::Get(engine_type);
+ const Engine *e = Engine::GetIfValid(engine_type);
+ assert(e != NULL);
switch (e->type) {
case VEH_TRAIN: