1
0
Fork 0

Fix 667d0137: NewGRF details view does not show the "No information available", if the NewGRF sets an empty description. (#13939)

pull/13947/head
stormcone 2025-04-01 16:10:59 +02:00 committed by GitHub
parent f8f76eb9f3
commit 8d0ba5649a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ static void ShowNewGRFInfo(const GRFConfig &c, const Rect &r, bool show_params)
if (c.flags.Test(GRFConfigFlag::Compatible)) tr.top = DrawStringMultiLine(tr, STR_NEWGRF_COMPATIBLE_LOADED);
/* Draw GRF info if it exists */
if (auto desc = c.GetDescription(); desc.has_value()) {
if (auto desc = c.GetDescription(); desc.has_value() && !desc->empty()) {
tr.top = DrawStringMultiLine(tr, GetString(STR_JUST_RAW_STRING, std::move(*desc)), TC_BLACK);
} else {
tr.top = DrawStringMultiLine(tr, STR_NEWGRF_SETTINGS_NO_INFO);