diff --git a/newgrf_config.c b/newgrf_config.c --- a/newgrf_config.c +++ b/newgrf_config.c @@ -115,6 +115,8 @@ GRFConfig **CopyGRFConfigList(GRFConfig { GRFConfig *c; + /* Clear destination as it will be overwritten */ + ClearGRFConfigList(dst); for (; src != NULL; src = src->next) { c = calloc(1, sizeof(*c)); *c = *src; @@ -135,8 +137,6 @@ void ResetGRFConfig(bool defaults) { GRFConfig **c = &_grfconfig; - ClearGRFConfigList(c); - if (defaults) c = CopyGRFConfigList(c, _grfconfig_newgame); CopyGRFConfigList(c, _grfconfig_static); }