Mercurial > hg > openttd
changeset 6183:9da82bce7276 draft
(svn r8955) -Fix: crash on loading savegames with GRFs that do not have their GRF info/name set.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Thu, 01 Mar 2007 18:28:55 +0000 |
parents | e1626f2e63ad |
children | 468e6b1e100c |
files | src/newgrf_config.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -255,8 +255,8 @@ 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; } }