Fix potential ObjectDisposedException on realm notification in SkinSection

This commit is contained in:
Dean Herbert 2022-05-29 15:15:03 +09:00
parent 20701edc23
commit c7570fbce5

View File

@ -111,7 +111,7 @@ namespace osu.Game.Overlays.Settings.Sections
configBindable.Value = skin.NewValue.ID.ToString(); configBindable.Value = skin.NewValue.ID.ToString();
} }
private void skinsChanged(IRealmCollection<SkinInfo> sender, ChangeSet changes, Exception error) private void skinsChanged(IRealmCollection<SkinInfo> sender, ChangeSet changes, Exception error) => Schedule(() =>
{ {
// This can only mean that realm is recycling, else we would see the protected skins. // This can only mean that realm is recycling, else we would see the protected skins.
// Because we are using `Live<>` in this class, we don't need to worry about this scenario too much. // Because we are using `Live<>` in this class, we don't need to worry about this scenario too much.
@ -130,7 +130,7 @@ namespace osu.Game.Overlays.Settings.Sections
skinDropdown.Items = dropdownItems; skinDropdown.Items = dropdownItems;
updateSelectedSkinFromConfig(); updateSelectedSkinFromConfig();
} });
private void updateSelectedSkinFromConfig() private void updateSelectedSkinFromConfig()
{ {