diff options
author | Peter Nelson <peter1138@openttd.org> | 2021-04-29 20:04:50 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2021-06-14 17:49:01 +0100 |
commit | 7385e780ac2861ca98e10d660ba4a6351a6b2741 (patch) | |
tree | e25428c3d4bec6611960eef318acf1188c790f8c /src/depot_gui.cpp | |
parent | c811d42d0c5320ab03b59227379367dedcda53cc (diff) | |
download | openttd-7385e780ac2861ca98e10d660ba4a6351a6b2741.tar.xz |
Cleanup: nested_array should not be accessed directly.
Replace accesses with GetWidget() as documented.
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r-- | src/depot_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 151eb928d..d6f4d900c 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -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); } |