diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp index 9eca36c24c..5b7db9b30d 100644 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -85,7 +85,7 @@ void GRFConfig::CopyParams(const GRFConfig &src) std::string GRFConfig::GetName() const { auto name = GetGRFStringFromGRFText(this->name); - return name.has_value() ? std::string(*name) : this->filename; + return name.has_value() && !name->empty() ? std::string(*name) : this->filename; } /**