mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 07:32:55 +08:00
Add null check for safety
This commit is contained in:
parent
5ebec53970
commit
71f83dbdfa
@ -26,8 +26,11 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
audio.OnNewDevice -= onDeviceChanged;
|
||||
audio.OnLostDevice -= onDeviceChanged;
|
||||
if (audio != null)
|
||||
{
|
||||
audio.OnNewDevice -= onDeviceChanged;
|
||||
audio.OnLostDevice -= onDeviceChanged;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateItems()
|
||||
|
Loading…
Reference in New Issue
Block a user