From 8d0ba5649a900295c381437794965edc2ee6fdf2 Mon Sep 17 00:00:00 2001 From: stormcone <48624099+stormcone@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:10:59 +0200 Subject: [PATCH] Fix 667d0137: NewGRF details view does not show the "No information available", if the NewGRF sets an empty description. (#13939) --- src/newgrf_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 607614366b..c838687d7b 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -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);