Add null check for safety

This commit is contained in:
Dean Herbert 2017-08-16 20:16:40 +09:00
parent 5ebec53970
commit 71f83dbdfa
1 changed files with 5 additions and 2 deletions

View File

@ -26,9 +26,12 @@ protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
if (audio != null)
{
audio.OnNewDevice -= onDeviceChanged;
audio.OnLostDevice -= onDeviceChanged;
}
}
private void updateItems()
{