(svn r25319) -Fix [FS#5570]: crash when train with reserved cargo vanishes

This commit is contained in:
rubidium
2013-06-04 15:04:59 +00:00
parent 40c8184469
commit 46df11b74a
3 changed files with 5 additions and 0 deletions

View File

@@ -3432,6 +3432,7 @@ static void DeleteLastWagon(Train *v)
if (first->track == TRACK_BIT_DEPOT) {
SetWindowDirty(WC_VEHICLE_DEPOT, first->tile);
}
v->last_station_visited = first->last_station_visited; // for PreDestructor
}
/* 'v' shouldn't be accessed after it has been deleted */