1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 12:53:11 +08:00

Fix a potential InvalidOperationException when entering song select

Closes #3052.
This commit is contained in:
Dean Herbert 2018-07-23 13:11:06 +02:00
parent 9dc55688d2
commit 1b456fd716

View File

@ -79,8 +79,13 @@ namespace osu.Game.Screens.Select.Carousel
public override void Filter(FilterCriteria criteria)
{
base.Filter(criteria);
InternalChildren.Sort((x, y) => x.CompareTo(criteria, y));
InternalChildren.ForEach(c => c.Filter(criteria));
var children = new List<CarouselItem>(InternalChildren);
children.Sort((x, y) => x.CompareTo(criteria, y));
children.ForEach(c => c.Filter(criteria));
InternalChildren = children;
}
protected virtual void ChildItemStateChanged(CarouselItem item, CarouselItemState value)