mirror of
https://github.com/ppy/osu.git
synced 2026-05-27 05:09:58 +08:00
Fix crash due to misordered selection events
This commit is contained in:
@@ -559,6 +559,14 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
if (state.NewValue == CarouselItemState.Selected)
|
||||
{
|
||||
if (!AllowSelection)
|
||||
{
|
||||
// CarouselBeatmap may trigger a state change from OnClick, unaware that it is not allowed to.
|
||||
// we revert this change here to ensure sanity.
|
||||
c.State.Value = state.OldValue;
|
||||
return;
|
||||
}
|
||||
|
||||
selectedBeatmapSet = set;
|
||||
SelectionChanged?.Invoke(c.Beatmap);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user