mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Merge pull request #21352 from peppy/avoid-null-audio-device-name-crahs
Avoid crashing when a system audio device provides a `null` name
This commit is contained in:
commit
d5e9cb2477
@ -59,7 +59,11 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
|||||||
// the dropdown. BASS does not give us a simple mechanism to select
|
// the dropdown. BASS does not give us a simple mechanism to select
|
||||||
// specific audio devices in such a case anyways. Such
|
// specific audio devices in such a case anyways. Such
|
||||||
// functionality would require involved OS-specific code.
|
// functionality would require involved OS-specific code.
|
||||||
dropdown.Items = deviceItems.Distinct().ToList();
|
dropdown.Items = deviceItems
|
||||||
|
// Dropdown doesn't like null items. Somehow we are seeing some arrive here (see https://github.com/ppy/osu/issues/21271)
|
||||||
|
.Where(i => i != null)
|
||||||
|
.Distinct()
|
||||||
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user