mirror of
https://github.com/ppy/osu
synced 2024-12-16 03:45:46 +00:00
Fix possibility of crash when selecting a random skin during skin import
This commit is contained in:
parent
40f020c683
commit
b5e784ed42
@ -91,7 +91,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
if (skinDropdown.Items.All(s => s.ID != configBindable.Value))
|
||||
configBindable.Value = 0;
|
||||
|
||||
configBindable.BindValueChanged(id => dropdownBindable.Value = skinDropdown.Items.Single(s => s.ID == id.NewValue), true);
|
||||
configBindable.BindValueChanged(id => Scheduler.AddOnce(updateSelectedSkinFromConfig), true);
|
||||
dropdownBindable.BindValueChanged(skin =>
|
||||
{
|
||||
if (skin.NewValue == random_skin_info)
|
||||
@ -104,6 +104,8 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
});
|
||||
}
|
||||
|
||||
private void updateSelectedSkinFromConfig() => dropdownBindable.Value = skinDropdown.Items.Single(s => s.ID == configBindable.Value);
|
||||
|
||||
private void updateItems()
|
||||
{
|
||||
skinItems = skins.GetAllUsableSkins();
|
||||
|
Loading…
Reference in New Issue
Block a user