(svn r18616) -Fix [FS#3413]: crash when the current order is a conditional order when a plane is checking whether it needs servicing

pull/155/head
rubidium 15 years ago
parent 257a16a3b1
commit dfb55862f9

@ -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…
Cancel
Save