From 2b92d76e9d9c16bff305dff2247bf909eb03d2c9 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sat, 19 Apr 2025 15:04:18 +0100 Subject: [PATCH] Fix e49150f9ca: House picker crashes if selection is not available. (#14030) This occurs because the extra invalidation in OnInit() also happens on construction, and too early. Solution is to validate all instead of just position when invalidating in OnInit(). --- src/town_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 80b5f96d2f..78b7b0d59d 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -1743,7 +1743,7 @@ struct BuildHouseWindow : public PickerWindow { void OnInit() override { - this->InvalidateData(PickerInvalidation::Position); + this->InvalidateData(PICKER_INVALIDATION_ALL); this->PickerWindow::OnInit(); }