[Plugin] Fix crash when reading widget property on window that has both static and tab content (#18620)

This commit is contained in:
Basssiiie 2022-11-19 12:29:01 +01:00 committed by GitHub
parent c7da78a302
commit 5396368274
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -43,6 +43,7 @@
- Fix: [#18453] Slow walking guests don't get across level crossings in time.
- Fix: [#18459] Highlight path issues hides fences for paths with additions.
- Fix: [#18606] JSON objects do not take priority over the DAT files they supersede.
- Fix: [#18620] [Plugin] Crash when reading widget properties from windows that have both static and tab widgets.
0.4.2 (2022-10-05)
------------------------------------------------------------------------

View File

@ -365,7 +365,7 @@ namespace OpenRCT2::Ui::Windows
auto tabWidgetIndex = widgetDescIndex - Desc.Widgets.size();
if (tabWidgetIndex < widgets.size())
{
return &widgets[widgetDescIndex];
return &widgets[tabWidgetIndex];
}
}
}