Changeset - r16898:ecc17e887eaf
[Not reviewed]
master
0 1 0
rubidium - 13 years ago 2010-12-26 12:55:12
rubidium@openttd.org
(svn r21643) -Fix (r21642): crash when a train with no orders (or actually no order list) stops at a station
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -1764,7 +1764,7 @@ void Vehicle::BeginLoading()
 
		/* We weren't scheduled to stop here. Insert an automatic order
 
		 * to show that we are stopping here. */
 
		Order *in_list = this->GetOrder(this->cur_order_index);
 
		if (this->orders.list->GetNumOrders() < MAX_VEH_ORDER_ID &&
 
		if ((this->orders.list == NULL || this->orders.list->GetNumOrders() < MAX_VEH_ORDER_ID) &&
 
				((in_list == NULL && this->cur_order_index == 0) ||
 
				(in_list != NULL && (!in_list->IsType(OT_AUTOMATIC) ||
 
				in_list->GetDestination() != this->last_station_visited)))) {
0 comments (0 inline, 0 general)