1
0
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:
Dean Herbert 2017-08-16 20:16:40 +09:00
parent 5ebec53970
commit 71f83dbdfa

View File

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