summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 8fcc38c7c..ca1d13f33 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -1787,7 +1787,13 @@ struct ScanProgressWindow : public Window {
void UpdateNewGRFScanStatus(uint num, const char *name)
{
free(this->last_name);
- this->last_name = strdup(name);
+ if (name == NULL) {
+ char buf[256];
+ GetString(buf, STR_NEWGRF_SCAN_ARCHIVES, lastof(buf));
+ this->last_name = strdup(buf);
+ } else {
+ this->last_name = strdup(name);
+ }
this->scanned = num;
if (num > _settings_client.gui.last_newgrf_count) _settings_client.gui.last_newgrf_count = num;