mirror of
https://github.com/ppy/osu
synced 2025-01-18 20:10:49 +00: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
|
||||
// specific audio devices in such a case anyways. Such
|
||||
// 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)
|
||||
|
Loading…
Reference in New Issue
Block a user