summaryrefslogtreecommitdiff
path: root/newgrf_config.c
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-12-23 09:06:37 +0000
committerrubidium <rubidium@openttd.org>2006-12-23 09:06:37 +0000
commitb1cfea6596c2dffe22ff46e9587b07ccd125abae (patch)
tree57f3d1b8709abf8e2a34e9cd9e074f10508dab91 /newgrf_config.c
parentee51d18f860ee4cbf08d06c245b2cb648c6aec17 (diff)
downloadopenttd-b1cfea6596c2dffe22ff46e9587b07ccd125abae.tar.xz
(svn r7551) -Fix (r7523): segmentation fault on showing NewGRF settings of a network game.
Diffstat (limited to 'newgrf_config.c')
-rw-r--r--newgrf_config.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/newgrf_config.c b/newgrf_config.c
index b70c8354f..6b74c99b2 100644
--- a/newgrf_config.c
+++ b/newgrf_config.c
@@ -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;