mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 16:43:52 +09: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:
@ -134,6 +134,9 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
|
|
||||||
private void updateSelectedSkinFromConfig()
|
private void updateSelectedSkinFromConfig()
|
||||||
{
|
{
|
||||||
|
if (!skinDropdown.Items.Any())
|
||||||
|
return;
|
||||||
|
|
||||||
Live<SkinInfo> skin = null;
|
Live<SkinInfo> skin = null;
|
||||||
|
|
||||||
if (Guid.TryParse(configBindable.Value, out var configId))
|
if (Guid.TryParse(configBindable.Value, out var configId))
|
||||||
|
Reference in New Issue
Block a user