aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index ab21c356..0cde449e 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2749,9 +2749,8 @@ static void FreeContext(ALCcontext *context)
if(ATOMIC_EXCHANGE(&context->EnabledEvts, 0, almemory_order_acq_rel))
{
static const AsyncEvent kill_evt = { 0 };
- while(ll_ringbuffer_write_space(context->AsyncEvents) == 0)
+ while(ll_ringbuffer_write(context->AsyncEvents, (const char*)&kill_evt, 1) == 0)
althrd_yield();
- ll_ringbuffer_write(context->AsyncEvents, (const char*)&kill_evt, 1);
alsem_post(&context->EventSem);
althrd_join(context->EventThread, NULL);
}