summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-07-30 22:43:50 +0000
committerbjarni <bjarni@openttd.org>2006-07-30 22:43:50 +0000
commit6224c7485c7e4c36e56463d6a7abe25ce6527b28 (patch)
treeab72dc1daee5475acb555fcac1f0e736bc8e5018
parentc3bc55119538d48b104c1a7b0e72f11711810849 (diff)
downloadopenttd-6224c7485c7e4c36e56463d6a7abe25ce6527b28.tar.xz
(svn r5664) -Fix: [SF 1518090 ] moving train engines in depot - crash (svn r5463)
this was present long before 5463 Darkvater deserves some of the credit for this fix since he discovered where the first pointer got set incorrectly
-rw-r--r--train_cmd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 093f50420..79d64607d 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1156,6 +1156,8 @@ int32 CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
src_head = src_head->next;
}
AddWagonToConsist(src->u.rail.other_multiheaded_part, src);
+ // previous line set the front engine to the old front. We need to clear that
+ src->u.rail.other_multiheaded_part->first = NULL;
}
if (HASBIT(p2, 0) && src_head != NULL && src_head != src) {