# HG changeset patch # User bjarni # Date 1154299430 0 # Node ID 49365e663adf8de28bd1d920bd212e557e0949ff # Parent c36237715acf7c9eb77ffa928a7b17e7678108fc (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 diff --git a/train_cmd.c b/train_cmd.c --- a/train_cmd.c +++ b/train_cmd.c @@ -1156,6 +1156,8 @@ 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) {