mirror of https://github.com/ppy/osu
Add null check for safety
This commit is contained in:
parent
5ebec53970
commit
71f83dbdfa
|
@ -26,8 +26,11 @@ protected override void Dispose(bool isDisposing)
|
|||
{
|
||||
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