diff options
author | rubidium <rubidium@openttd.org> | 2007-03-01 18:28:55 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-03-01 18:28:55 +0000 |
commit | c8faa6bee2ea565d6422ee0e35e58fd5535e7ecb (patch) | |
tree | 523e569d2a2ffdac13a59a8c182e7e44bd27dd41 /src | |
parent | 05fe6d2362fe8a7b657c30629d6883dbb5660b29 (diff) | |
download | openttd-c8faa6bee2ea565d6422ee0e35e58fd5535e7ecb.tar.xz |
(svn r8955) -Fix: crash on loading savegames with GRFs that do not have their GRF info/name set.
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; } } |