# HG changeset patch # User bjarni # Date 1180805011 0 # Node ID 9a1949f8fab4f5347d2df22051fab30af205cda5 # Parent 47f6921e8c4c8eb96056183bf275ad277c14d308 (svn r10026) -Fix: unlinking a rail vehicle didn't clear the first pointer After r9973, this could cause some asserts as some vehicles could end up with first pointers to chains they didn't belong to diff -r 47f6921e8c4c -r 9a1949f8fab4 src/train_cmd.cpp --- a/src/train_cmd.cpp Sat Jun 02 15:47:38 2007 +0000 +++ b/src/train_cmd.cpp Sat Jun 02 17:23:31 2007 +0000 @@ -839,6 +839,7 @@ Vehicle *u; for (u = first; GetNextVehicle(u) != v; u = GetNextVehicle(u)) {} GetLastEnginePart(u)->next = GetNextVehicle(v); + v->first = NULL; // we shouldn't point to the old first, since the vehicle isn't in that chain anymore return first; }