mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
Fix possible race condition.
This commit is contained in:
parent
4759e3411f
commit
014c3c90e0
@ -192,8 +192,6 @@ static void dsound_free(void *data)
|
|||||||
dsound_t *ds = data;
|
dsound_t *ds = data;
|
||||||
if (ds)
|
if (ds)
|
||||||
{
|
{
|
||||||
DeleteCriticalSection(&ds->crit);
|
|
||||||
|
|
||||||
if (ds->thread)
|
if (ds->thread)
|
||||||
{
|
{
|
||||||
ds->thread_alive = false;
|
ds->thread_alive = false;
|
||||||
@ -201,6 +199,8 @@ static void dsound_free(void *data)
|
|||||||
CloseHandle(ds->thread);
|
CloseHandle(ds->thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeleteCriticalSection(&ds->crit);
|
||||||
|
|
||||||
if (ds->dsb)
|
if (ds->dsb)
|
||||||
{
|
{
|
||||||
IDirectSoundBuffer_Stop(ds->dsb);
|
IDirectSoundBuffer_Stop(ds->dsb);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user