summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-12-28 16:11:07 +0000
committerpeter1138 <peter1138@openttd.org>2006-12-28 16:11:07 +0000
commit822646b9a90c12b49fa9e38558b6b6d6ac01df84 (patch)
treee55c9d24f13de950ac3a722f69850f4bd8292ca6
parente9e4ba822215abdcd5403dfd1517c52a631acb3a (diff)
downloadopenttd-822646b9a90c12b49fa9e38558b6b6d6ac01df84.tar.xz
(svn r7594) -Fix (r7522): GRF config list wasn't cleared when no GRFs should be used.
-rw-r--r--newgrf_config.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/newgrf_config.c b/newgrf_config.c
index 421333ba8..9cea7c49d 100644
--- a/newgrf_config.c
+++ b/newgrf_config.c
@@ -181,7 +181,12 @@ void ResetGRFConfig(bool defaults)
{
GRFConfig **c = &_grfconfig;
- if (defaults) c = CopyGRFConfigList(c, _grfconfig_newgame);
+ if (defaults) {
+ c = CopyGRFConfigList(c, _grfconfig_newgame);
+ } else {
+ ClearGRFConfigList(c);
+ }
+
AppendStaticGRFConfigs(&_grfconfig);
}