From 9da1c5bb0bdb9e09fb0bd5ed69ffa1db85ab5c09 Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Fri, 26 Apr 2019 19:09:55 +0100 Subject: 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) --- src/saveload/afterload.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 9bdfa6b34..eea896dd7 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -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; -- cgit v1.2.3-70-g09d2