Skip to content

Commit

Permalink
[Plugin] Fix crash when reading widget property on window that has bo…
Browse files Browse the repository at this point in the history
…th static and tab content (#18620)
  • Loading branch information
Basssiiie committed Nov 19, 2022
1 parent c7da78a commit 5396368
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions distribution/changelog.txt
Expand Up @@ -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)
------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2-ui/scripting/CustomWindow.cpp
Expand Up @@ -365,7 +365,7 @@ namespace OpenRCT2::Ui::Windows
auto tabWidgetIndex = widgetDescIndex - Desc.Widgets.size();
if (tabWidgetIndex < widgets.size())
{
return &widgets[widgetDescIndex];
return &widgets[tabWidgetIndex];
}
}
}
Expand Down

0 comments on commit 5396368

Please sign in to comment.