mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r8955) -Fix: crash on loading savegames with GRFs that do not have their GRF info/name set.
This commit is contained in:
parent
05fe6d2362
commit
c8faa6bee2
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue