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
commitb161eea49c1b64b1456d0c5335e2f8fa150afb32 (patch)
treee55c9d24f13de950ac3a722f69850f4bd8292ca6
parent8ca21a3cb03f3275061676b9d20a7ba18429064e (diff)
downloadopenttd-b161eea49c1b64b1456d0c5335e2f8fa150afb32.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);
}