mirror of https://github.com/OpenTTD/OpenTTD
(svn r8135) -Fix (r7582): Don't assert on duplicate non-static grfs when removing duplicates as the PEBKAC effect can result in the user adding the same grf's in the config file.
parent
82b0704bcc
commit
de10e911cb
|
@ -157,7 +157,7 @@ static void RemoveDuplicatesFromGRFConfigList(GRFConfig *list)
|
||||||
|
|
||||||
for (prev = list, cur = list->next; cur != NULL; prev = cur, cur = cur->next) {
|
for (prev = list, cur = list->next; cur != NULL; prev = cur, cur = cur->next) {
|
||||||
if (cur->grfid != list->grfid) continue;
|
if (cur->grfid != list->grfid) continue;
|
||||||
assert(HASBIT(cur->flags, GCF_STATIC));
|
|
||||||
prev->next = cur->next;
|
prev->next = cur->next;
|
||||||
ClearGRFConfig(&cur);
|
ClearGRFConfig(&cur);
|
||||||
cur = prev; // Just go back one so it continues as normal later on
|
cur = prev; // Just go back one so it continues as normal later on
|
||||||
|
|
Loading…
Reference in New Issue