diff options
Diffstat (limited to 'newgrf_gui.c')
-rw-r--r-- | newgrf_gui.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/newgrf_gui.c b/newgrf_gui.c index b31c0b177..1b01a1a5a 100644 --- a/newgrf_gui.c +++ b/newgrf_gui.c @@ -43,9 +43,11 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint w, bool show char *s; uint i; - /* Draw filename */ - SetDParamStr(0, c->filename); - y += DrawStringMultiLine(x, y, STR_NEWGRF_FILENAME, w); + /* Draw filename or not if it is not known (GRF sent over internet) */ + if (c->filename != NULL) { + SetDParamStr(0, c->filename); + y += DrawStringMultiLine(x, y, STR_NEWGRF_FILENAME, w); + } /* Prepare and draw GRF ID */ snprintf(buff, lengthof(buff), "%08X", (uint32)BSWAP32(c->grfid)); |