mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-12 01:24:54 +00:00
(svn r7551) -Fix (r7523): segmentation fault on showing NewGRF settings of a network game.
This commit is contained in:
parent
ee51d18f86
commit
b1cfea6596
@ -120,9 +120,9 @@ GRFConfig **CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src)
|
|||||||
for (; src != NULL; src = src->next) {
|
for (; src != NULL; src = src->next) {
|
||||||
c = calloc(1, sizeof(*c));
|
c = calloc(1, sizeof(*c));
|
||||||
*c = *src;
|
*c = *src;
|
||||||
c->filename = strdup(src->filename);
|
if (src->filename != NULL) c->filename = strdup(src->filename);
|
||||||
if (src->name != NULL) c->name = strdup(src->name);
|
if (src->name != NULL) c->name = strdup(src->name);
|
||||||
if (src->info != NULL) c->info = strdup(src->info);
|
if (src->info != NULL) c->info = strdup(src->info);
|
||||||
|
|
||||||
*dst = c;
|
*dst = c;
|
||||||
dst = &c->next;
|
dst = &c->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user