diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 8b42d1ce3d..a48f4c1788 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -113,8 +113,9 @@ static void ShowNewGRFInfo(const GRFConfig *c, const Rect &r, bool show_params) /* Show GRF parameter list */ if (show_params) { + std::string params; if (c->num_params > 0) { - std::string params = GRFBuildParamList(c); + params = GRFBuildParamList(c); SetDParam(0, STR_JUST_RAW_STRING); SetDParamStr(1, params); } else {