mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-23 10:51:58 -05:00
The report in #11068 was using track designs manager with "Boat hire" ride, for which there were no designs and selecting "Clear" button on the list accessed empty vector in `_filteredTrackIds`.
This commit is contained in:
parent
5276ce767a
commit
56e6ec2c23
1 changed files with 4 additions and 1 deletions
|
@ -337,7 +337,10 @@ static void window_track_list_mouseup(rct_window* w, rct_widgetindex widgetIndex
|
|||
// Keep the highlighted item selected
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)
|
||||
{
|
||||
w->selected_list_item = _filteredTrackIds[w->selected_list_item];
|
||||
if (w->selected_list_item != -1 && _filteredTrackIds.size() > static_cast<size_t>(w->selected_list_item))
|
||||
w->selected_list_item = _filteredTrackIds[w->selected_list_item];
|
||||
else
|
||||
w->selected_list_item = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue