1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 03:22:55 +08:00

Fix stackoverflow

This commit is contained in:
smoogipoo 2020-09-02 21:52:56 +09:00
parent 5ebead2bfd
commit 02a908752f

View File

@ -224,7 +224,6 @@ namespace osu.Game.Screens.Select
{
base.LoadComplete();
beatmaps.CollectionChanged += filterBeatmapsChanged;
Current.BindValueChanged(filterChanged, true);
}
@ -247,11 +246,15 @@ namespace osu.Game.Screens.Select
/// </summary>
private void filterChanged(ValueChangedEvent<CollectionFilter> filter)
{
beatmaps.CollectionChanged -= filterBeatmapsChanged;
if (filter.OldValue?.Collection != null)
beatmaps.UnbindFrom(filter.OldValue.Collection.Beatmaps);
if (filter.NewValue?.Collection != null)
beatmaps.BindTo(filter.NewValue.Collection.Beatmaps);
beatmaps.CollectionChanged += filterBeatmapsChanged;
}
/// <summary>