From 4ab48f34f5188a98092fbb1c651b7f436bd757fb Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sat, 31 May 2025 09:20:55 +0100 Subject: [PATCH] Fix 5664b1e2f6: Upgrade button in NewGRF window no longer worked. (#14315) --- 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 ef5b493cfd..86080fd2e4 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -708,7 +708,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback { auto c = std::ranges::find_if(this->actives, [&iter](const auto &grfconfig) { return grfconfig.get() == iter->second; }); assert(c != std::end(this->actives)); - auto d = std::make_unique(*iter->second); + auto d = std::make_unique(*a); if (d->IsCompatible((*c)->version)) { d->CopyParams(**c); } else {