diff --git a/src/network/core/tcp_content.cpp b/src/network/core/tcp_content.cpp index 48013bafd9..3fe6aa6b7a 100644 --- a/src/network/core/tcp_content.cpp +++ b/src/network/core/tcp_content.cpp @@ -76,7 +76,7 @@ std::optional ContentInfo::GetTextfile(TextfileType type) const break; case CONTENT_TYPE_NEWGRF: { const GRFConfig *gc = FindGRFConfig(std::byteswap(this->unique_id), FGCM_EXACT, &this->md5sum); - tmp = gc != nullptr ? gc->filename.c_str() : nullptr; + if (gc != nullptr) tmp = gc->filename; break; } case CONTENT_TYPE_BASE_GRAPHICS: