1
0
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:
Dean Herbert 2022-03-09 01:08:11 +09:00
parent a352a140bc
commit a2ef086c1f

View File

@ -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))