mirror of
https://github.com/ppy/osu
synced 2025-01-11 16:49:39 +00:00
Fix potential crash from cross-thread drawable manipulation in CollectionFilterDropdown
This commit is contained in:
parent
e30fb72ee2
commit
90dce52042
@ -41,19 +41,18 @@ namespace osu.Game.Collections
|
||||
ItemSource = filters;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load([CanBeNull] CollectionManager collectionManager)
|
||||
[Resolved(CanBeNull = true)]
|
||||
private CollectionManager collectionManager { get; set; }
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
if (collectionManager != null)
|
||||
collections.BindTo(collectionManager.Collections);
|
||||
|
||||
collections.CollectionChanged += (_, __) => collectionsChanged();
|
||||
collectionsChanged();
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Current.BindValueChanged(filterChanged, true);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Screens.Select
|
||||
Sort = sortMode.Value,
|
||||
AllowConvertedBeatmaps = showConverted.Value,
|
||||
Ruleset = ruleset.Value,
|
||||
Collection = collectionDropdown?.Current.Value.Collection
|
||||
Collection = collectionDropdown?.Current.Value?.Collection
|
||||
};
|
||||
|
||||
if (!minimumStars.IsDefault)
|
||||
|
Loading…
Reference in New Issue
Block a user