From c09fdb0444f709218b71dd065f8c450864b78703 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Mon, 26 Feb 2024 00:21:04 +0000 Subject: [PATCH] Fix company infrastructure windows not being marked as a company window Fixes it not being removed on company deletion, which could cause a crash --- src/company_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 090ad984ea..a67b42e65f 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -1845,12 +1845,12 @@ struct CompanyInfrastructureWindow : Window { this->UpdateRailRoadTypes(); - this->owner = (Owner)this->window_number; - this->CreateNestedTree(); this->vscroll = this->GetScrollbar(WID_CI_SCROLLBAR); this->vscroll->SetStepSize(GetCharacterHeight(FS_NORMAL)); this->FinishInitNested(window_number); + + this->owner = (Owner)this->window_number; } void UpdateRailRoadTypes()