summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/train_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index a5964e927..e17521ad6 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -992,7 +992,7 @@ static CommandCost CheckTrainAttachment(Train *t)
/* A failing callback means everything is okay */
StringID error = STR_NULL;
- if (t->GetGRF()->grf_version < 8) {
+ if (head->GetGRF()->grf_version < 8) {
if (callback == 0xFD) error = STR_ERROR_INCOMPATIBLE_RAIL_TYPES;
if (callback < 0xFD) error = GetGRFStringID(head->GetGRFID(), 0xD000 + callback);
if (callback >= 0x100) ErrorUnknownCallbackResult(head->GetGRFID(), CBID_TRAIN_ALLOW_WAGON_ATTACH, callback);