From 9e90d4ed79f68f1b21530000d5191517b75c0038 Mon Sep 17 00:00:00 2001 From: frosch Date: Wed, 30 Apr 2025 12:38:35 +0200 Subject: [PATCH] Codefix: Do not assign nullptr to std::string_view. --- src/network/core/tcp_content.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: