avoid race condition on StreamingSound.Dispose
parent
baef5d3ed9
commit
1cdcdab148
|
@ -149,6 +149,8 @@ namespace MoonWorks.Audio
|
|||
protected override unsafe void Dispose(bool disposing)
|
||||
{
|
||||
if (!IsDisposed)
|
||||
{
|
||||
lock (StateLock)
|
||||
{
|
||||
Stop();
|
||||
|
||||
|
@ -160,6 +162,7 @@ namespace MoonWorks.Audio
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue