mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-02 09:40:35 +00:00
(svn r18616) -Fix [FS#3413]: crash when the current order is a conditional order when a plane is checking whether it needs servicing
This commit is contained in:
parent
277794e26b
commit
97e7a584a2
@ -522,6 +522,10 @@ static void CheckIfAircraftNeedsService(Aircraft *v)
|
||||
return;
|
||||
}
|
||||
|
||||
/* When we're parsing conditional orders and the like
|
||||
* we don't want to consider going to a depot too. */
|
||||
if (!v->current_order.IsType(OT_GOTO_DEPOT) && !v->current_order.IsType(OT_GOTO_STATION)) return;
|
||||
|
||||
const Station *st = Station::Get(v->current_order.GetDestination());
|
||||
|
||||
assert(st != NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user