summaryrefslogtreecommitdiff
path: root/src/articulated_vehicles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/articulated_vehicles.cpp')
-rw-r--r--src/articulated_vehicles.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp
index f186915b9..8d3932ce2 100644
--- a/src/articulated_vehicles.cpp
+++ b/src/articulated_vehicles.cpp
@@ -37,7 +37,8 @@ static EngineID GetNextArticulatedPart(uint index, EngineID front_type, Vehicle
if (callback == CALLBACK_FAILED || GB(callback, 0, 8) == 0xFF) return INVALID_ENGINE;
if (mirrored != NULL) *mirrored = HasBit(callback, 7);
- return GetNewEngineID(GetEngineGRF(front_type), Engine::Get(front_type)->type, GB(callback, 0, 7));
+ const Engine *front_engine = Engine::Get(front_type);
+ return GetNewEngineID(front_engine->GetGRF(), front_engine->type, GB(callback, 0, 7));
}
/**