mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
(svn r24508) -Fix [FS#5281] (24488): Content GUI crashed after downloading a NewGRF while it is selected.
This commit is contained in:
parent
4512a4f225
commit
e84cf93c98
@ -116,9 +116,11 @@ const char *ContentInfo::GetTextfile(TextfileType type) const
|
||||
case CONTENT_TYPE_GAME_LIBRARY:
|
||||
tmp = Game::GetScannerLibrary()->FindMainScript(this, true);
|
||||
break;
|
||||
case CONTENT_TYPE_NEWGRF:
|
||||
tmp = FindGRFConfig(BSWAP32(this->unique_id), FGCM_EXACT, this->md5sum)->filename;
|
||||
case CONTENT_TYPE_NEWGRF: {
|
||||
const GRFConfig *gc = FindGRFConfig(BSWAP32(this->unique_id), FGCM_EXACT, this->md5sum);
|
||||
tmp = gc != NULL ? gc->filename : NULL;
|
||||
break;
|
||||
}
|
||||
case CONTENT_TYPE_BASE_GRAPHICS:
|
||||
tmp = TryGetBaseSetFile(this, true, BaseGraphics::GetAvailableSets());
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user