diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2019-04-26 19:09:55 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-04-29 17:46:28 +0100 |
commit | 9da1c5bb0bdb9e09fb0bd5ed69ffa1db85ab5c09 (patch) | |
tree | 51158b6561fed24779ac544f7ed78278c3bbbdb1 /src | |
parent | 47d0d86a3c31c3b9ae71e5bed5007d0ba0a1337d (diff) | |
download | openttd-9da1c5bb0bdb9e09fb0bd5ed69ffa1db85ab5c09.tar.xz |
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)
Diffstat (limited to 'src')
-rw-r--r-- | src/saveload/afterload.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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; |