1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 13:03:11 +01:00

Fix #22457: Potential crash opening the scenario select window

This commit is contained in:
Matt
2024-08-15 19:31:27 +03:00
committed by GitHub
parent b4c7cb50af
commit d72e535117
3 changed files with 5 additions and 3 deletions

View File

@@ -14,6 +14,7 @@
- Fix: [#22307] Hover tooltips in financial charts are not invalidated properly.
- Fix: [#22316] Potential crash when switching the drawing engine while the game is running.
- Fix: [#22395, #22396] Misaligned tick marks in financial and guest count graphs (original bug).
- Fix: [#22457] Potential crash opening the scenario select window.
0.4.13 (2024-08-04)
------------------------------------------------------------------------

View File

@@ -126,10 +126,11 @@ static Widget _scenarioSelectWidgets[] = {
void OnOpen() override
{
widgets = _scenarioSelectWidgets;
// Load scenario list
ScenarioRepositoryScan();
widgets = _scenarioSelectWidgets;
_highlightedScenario = nullptr;
InitTabs();
InitialiseListItems();

View File

@@ -214,12 +214,12 @@ static Widget _trackListWidgets[] = {
void OnOpen() override
{
LoadDesignsList(_window_track_list_item);
String::Set(_filterString, sizeof(_filterString), "");
_trackListWidgets[WIDX_FILTER_STRING].string = _filterString;
widgets = _trackListWidgets;
LoadDesignsList(_window_track_list_item);
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)
{
widgets[WIDX_BACK].type = WindowWidgetType::Empty;