1
0
Fork 0

Fix: Crash when attempting to load old save game with GRFs set

GroupStatistics pool was not initialised before trying to delete vehicles (specifically, trams with no tram track)
pull/7551/head
Charles Pigott 2019-04-26 19:09:55 +01:00 committed by PeterN
parent 47d0d86a3c
commit 9da1c5bb0b
1 changed files with 1 additions and 0 deletions

View File

@ -1900,6 +1900,7 @@ bool AfterLoadGame()
}
if (IsSavegameVersionBefore(SLV_62)) {
GroupStatistics::UpdateAfterLoad(); // Ensure statistics pool is initialised before trying to delete vehicles
/* Remove all trams from savegames without tram support.
* There would be trams without tram track under causing crashes sooner or later. */
RoadVehicle *v;