mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 19:21:03 +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;
|
||||
if (ds)
|
||||
{
|
||||
DeleteCriticalSection(&ds->crit);
|
||||
|
||||
if (ds->thread)
|
||||
{
|
||||
ds->thread_alive = false;
|
||||
@ -201,6 +199,8 @@ static void dsound_free(void *data)
|
||||
CloseHandle(ds->thread);
|
||||
}
|
||||
|
||||
DeleteCriticalSection(&ds->crit);
|
||||
|
||||
if (ds->dsb)
|
||||
{
|
||||
IDirectSoundBuffer_Stop(ds->dsb);
|
||||
|
Loading…
x
Reference in New Issue
Block a user