From f2143b3d9bc31ae2e0b6d738327f1f02321eebc1 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Wed, 3 May 2006 20:09:28 +0000 Subject: [PATCH] (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. --- station_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/station_cmd.c b/station_cmd.c index 1263634191..4f3f49dcd4 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -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) ||