(svn r7551) -Fix (r7523): segmentation fault on showing NewGRF settings of a network game.

This commit is contained in:
rubidium 2006-12-23 09:06:37 +00:00
parent 1805266825
commit acb4f49de0

View File

@ -120,9 +120,9 @@ GRFConfig **CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src)
for (; src != NULL; src = src->next) {
c = calloc(1, sizeof(*c));
*c = *src;
c->filename = strdup(src->filename);
if (src->name != NULL) c->name = strdup(src->name);
if (src->info != NULL) c->info = strdup(src->info);
if (src->filename != NULL) c->filename = strdup(src->filename);
if (src->name != NULL) c->name = strdup(src->name);
if (src->info != NULL) c->info = strdup(src->info);
*dst = c;
dst = &c->next;