(svn r8955) -Fix: crash on loading savegames with GRFs that do not have their GRF info/name set.

This commit is contained in:
rubidium 2007-03-01 18:28:55 +00:00
parent 05fe6d2362
commit c8faa6bee2
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}