(svn r4717) - Backport from trunk (r4466):

Fix: Game no longer crashes when the last vehicle serving a station has been
  deleted. This is not exactly the same fix as in trunk/ where it might still
  accept types of invalid types but it doesn't crash anymore. The true fix is
  not possible without a savegame bump.
This commit is contained in:
Darkvater 2006-05-03 20:09:28 +00:00
parent 9c97eb32ba
commit f2143b3d9b
1 changed files with 1 additions and 1 deletions

View File

@ -2449,7 +2449,7 @@ static void UpdateStationRating(Station *st)
{
byte days = ge->days_since_pickup;
if (st->last_vehicle != INVALID_VEHICLE &&
if (st->last_vehicle != INVALID_VEHICLE && IsVehicleIndex(st->last_vehicle) &&
GetVehicle(st->last_vehicle)->type == VEH_Ship)
days >>= 2;
(days > 21) ||