mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
Fix potential crash on rare incorrect firing of skin dropdown update methods
As brought to light by https://gist.github.com/smoogipoo/56eda7ab56b9d1966556f2ca7a80a847. There's a chance that the dropdown is not populated by the time `updateSelectedSkinFromConfig` is fired via an external means (config changes).
This commit is contained in:
parent
a352a140bc
commit
a2ef086c1f
@ -134,6 +134,9 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
|
||||
private void updateSelectedSkinFromConfig()
|
||||
{
|
||||
if (!skinDropdown.Items.Any())
|
||||
return;
|
||||
|
||||
Live<SkinInfo> skin = null;
|
||||
|
||||
if (Guid.TryParse(configBindable.Value, out var configId))
|
||||
|
Loading…
Reference in New Issue
Block a user