summaryrefslogtreecommitdiff
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
commitacb4f49de02e7f77494c7d6b8e5a7f67f17b504e (patch)
tree57f3d1b8709abf8e2a34e9cd9e074f10508dab91
parent18052668255fddeca2cb52f81a38ca4e8ba28b28 (diff)
downloadopenttd-acb4f49de02e7f77494c7d6b8e5a7f67f17b504e.tar.xz
(svn r7551) -Fix (r7523): segmentation fault on showing NewGRF settings of a network game.
-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;