mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r13999) -Fix [FS#2190]: crash when the AI tries to find the depot of an airport that doesn't have a depot.
This commit is contained in:
parent
8025cd1d2c
commit
fe6111d6f2
|
@ -3574,6 +3574,7 @@ static void AiStateBuildAircraftVehicles(Player *p)
|
|||
|
||||
veh = AiChooseAircraftToBuild(p->player_money, forbidden);
|
||||
if (veh == INVALID_ENGINE) return;
|
||||
if (GetStationByTile(tile)->Airport()->nof_depots == 0) return;
|
||||
|
||||
/* XXX - Have the AI pick the hangar terminal in an airport. Eg get airport-type
|
||||
* and offset to the FIRST depot because the AI picks the st->xy tile */
|
||||
|
|
Loading…
Reference in New Issue