From 63baa3b1c712317e7826de6f28ecc865d1fb9b58 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 20 Apr 2017 03:14:49 -0700 Subject: Missed a raw atomic variable access --- OpenAL32/alSource.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenAL32/alSource.c') diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 0da513aa..757c96db 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -2810,8 +2810,9 @@ AL_API ALvoid AL_APIENTRY alSourceQueueBuffers(ALuint src, ALsizei nb, const ALu source->queue = BufferListStart; else { - while(BufferList->next != NULL) - BufferList = ATOMIC_LOAD(&BufferList->next, almemory_order_relaxed); + ALbufferlistitem *next; + while((next=ATOMIC_LOAD(&BufferList->next, almemory_order_relaxed)) != NULL) + BufferList = next; ATOMIC_STORE(&BufferList->next, BufferListStart, almemory_order_release); } WriteUnlock(&source->queue_lock); -- cgit v1.2.3