mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-08 07:21:53 +00:00
(svn r26101) -Fix: NULL pointer dereference when one can't allocate an order list but wants to make implicit orders
This commit is contained in:
parent
573f6dcd34
commit
18beaac571
@ -2012,8 +2012,7 @@ void Vehicle::BeginLoading()
|
||||
}
|
||||
}
|
||||
} else if (!suppress_implicit_orders &&
|
||||
((this->orders.list == NULL && OrderList::CanAllocateItem()) ||
|
||||
this->orders.list->GetNumOrders() < MAX_VEH_ORDER_ID) &&
|
||||
((this->orders.list == NULL ? OrderList::CanAllocateItem() : this->orders.list->GetNumOrders() < MAX_VEH_ORDER_ID)) &&
|
||||
Order::CanAllocateItem()) {
|
||||
/* Insert new implicit order */
|
||||
Order *implicit_order = new Order();
|
||||
|
Loading…
Reference in New Issue
Block a user