Fix company infrastructure windows not being marked as a company window

Fixes it not being removed on company deletion, which could cause a crash
This commit is contained in:
Jonathan G Rennison
2024-02-26 00:21:04 +00:00
parent 0d20a54dc5
commit c09fdb0444

View File

@@ -1845,12 +1845,12 @@ struct CompanyInfrastructureWindow : Window
{ {
this->UpdateRailRoadTypes(); this->UpdateRailRoadTypes();
this->owner = (Owner)this->window_number;
this->CreateNestedTree(); this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_CI_SCROLLBAR); this->vscroll = this->GetScrollbar(WID_CI_SCROLLBAR);
this->vscroll->SetStepSize(GetCharacterHeight(FS_NORMAL)); this->vscroll->SetStepSize(GetCharacterHeight(FS_NORMAL));
this->FinishInitNested(window_number); this->FinishInitNested(window_number);
this->owner = (Owner)this->window_number;
} }
void UpdateRailRoadTypes() void UpdateRailRoadTypes()