(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:
rubidium 2009-12-23 18:45:05 +00:00
parent 277794e26b
commit 97e7a584a2

View File

@ -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);