summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp2
-rw-r--r--src/newgrf.h1
-rw-r--r--src/openttd.cpp3
3 files changed, 5 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index d26e8973d..b902929e5 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -6984,7 +6984,7 @@ static void ResetNewGRFErrors()
* Reset all NewGRF loaded data
* TODO
*/
-static void ResetNewGRFData()
+void ResetNewGRFData()
{
CleanUpStrings();
CleanUpGRFTownNames();
diff --git a/src/newgrf.h b/src/newgrf.h
index 58202ed25..eb4e8b298 100644
--- a/src/newgrf.h
+++ b/src/newgrf.h
@@ -159,6 +159,7 @@ extern GRFLoadedFeatures _loaded_newgrf_features;
void LoadNewGRFFile(struct GRFConfig *config, uint file_index, GrfLoadingStage stage);
void LoadNewGRF(uint load_index, uint file_index);
void ReloadNewGRFData(); // in saveload/afterload.cpp
+void ResetNewGRFData();
void CDECL grfmsg(int severity, const char *str, ...) WARN_FORMAT(2, 3);
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 25387f41c..e4f85a302 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -59,6 +59,7 @@
#include "rail_gui.h"
#include "core/backup_type.hpp"
#include "hotkeys.h"
+#include "newgrf.h"
#include "town.h"
@@ -347,6 +348,8 @@ static void ShutdownGame()
free(_config_file);
#endif
+ ResetNewGRFData();
+
/* Close all and any open filehandles */
FioCloseAll();
}