summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/train_cmd.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 05d95613e..5a4c854fe 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -885,6 +885,7 @@ static void AddWagonToConsist(Vehicle *v, Vehicle *dest)
if (dest == NULL) return;
Vehicle *next = dest->Next();
+ v->SetNext(NULL);
dest->SetNext(v);
v->SetNext(next);
ClearFreeWagon(v);