From 44911ec254d7df154ed26a3e915800d5f7631b58 Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Fri, 26 Apr 2019 19:09:55 +0100 Subject: [PATCH] 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) (cherry picked from commit 9da1c5bb0bdb9e09fb0bd5ed69ffa1db85ab5c09) --- src/saveload/afterload.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 7f13a2ee06..7b2bb71e38 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -2095,6 +2095,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;