Cleanup: nested_array should not be accessed directly.

Replace accesses with GetWidget() as documented.
This commit is contained in:
2021-04-29 20:04:50 +01:00
committed by PeterN
parent c811d42d0c
commit 7385e780ac
3 changed files with 3 additions and 3 deletions

View File

@@ -1046,7 +1046,7 @@ struct DepotWindow : Window {
this->RaiseWidget(WID_D_SELL);
this->SetWidgetDirty(WID_D_SELL);
}
if (this->nested_array[WID_D_SELL] != nullptr && !this->IsWidgetDisabled(WID_D_SELL_CHAIN)) {
if (this->GetWidget<NWidgetBase>(WID_D_SELL) != nullptr && !this->IsWidgetDisabled(WID_D_SELL_CHAIN)) {
this->RaiseWidget(WID_D_SELL_CHAIN);
this->SetWidgetDirty(WID_D_SELL_CHAIN);
}