diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf_config.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp index 1fc53fe6a..ccd212055 100644 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -255,8 +255,8 @@ compatible_grf: free(c->filename); c->filename = strdup(f->filename); memcpy(c->md5sum, f->md5sum, sizeof(c->md5sum)); - if (c->name == NULL) c->name = strdup(f->name); - if (c->info == NULL) c->info = strdup(f->info); + if (c->name == NULL && f->name != NULL) c->name = strdup(f->name); + if (c->info == NULL && f->info != NULL) c->info = strdup(f->info); c->error = NULL; } } |