mirror of https://github.com/OpenTTD/OpenTTD
(svn r18616) -Fix [FS#3413]: crash when the current order is a conditional order when a plane is checking whether it needs servicing
parent
277794e26b
commit
97e7a584a2
|
@ -522,6 +522,10 @@ static void CheckIfAircraftNeedsService(Aircraft *v)
|
||||||
return;
|
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());
|
const Station *st = Station::Get(v->current_order.GetDestination());
|
||||||
|
|
||||||
assert(st != NULL);
|
assert(st != NULL);
|
||||||
|
|
Loading…
Reference in New Issue