1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 10:22:39 +01:00

Fix #14958, e96f35c: Don't use not yet initialised member (#14959)

This commit is contained in:
Loïc Guilloux
2025-12-22 19:21:10 +01:00
committed by GitHub
parent b881d8ef5c
commit b36c78b2de

View File

@@ -1323,7 +1323,7 @@ struct StationViewWindow : public Window {
StationViewWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->CreateNestedTree();
this->GetWidget<NWidgetStacked>(WID_SV_CLOSE_AIRPORT_SEL)->SetDisplayedPlane(Station::Get(this->window_number)->facilities.Test(StationFacility::Airport) ? 0 : SZSP_NONE);
this->GetWidget<NWidgetStacked>(WID_SV_CLOSE_AIRPORT_SEL)->SetDisplayedPlane(Station::Get(window_number)->facilities.Test(StationFacility::Airport) ? 0 : SZSP_NONE);
this->vscroll = this->GetScrollbar(WID_SV_SCROLLBAR);
/* Nested widget tree creation is done in two steps to ensure that this->GetWidget<NWidgetCore>(WID_SV_ACCEPTS_RATINGS) exists in UpdateWidgetSize(). */
this->FinishInitNested(window_number);