aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alAuxEffectSlot.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-05-13 00:23:03 -0700
committerChris Robinson <[email protected]>2016-05-13 00:24:26 -0700
commit59cd6230a661d5cee69c0a44c4dde152eed9f865 (patch)
treeb2c0d30c5bde252cbace2bf920a06a0a87058373 /OpenAL32/alAuxEffectSlot.c
parent770bdcc108948d57d209878bf300c3e46346f931 (diff)
Properly load the effect state pointer from the property container
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r--OpenAL32/alAuxEffectSlot.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index 70bb4e43..98ee9328 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -552,7 +552,9 @@ void DeinitEffectSlot(ALeffectslot *slot)
props = ATOMIC_LOAD(&slot->Update);
if(props)
{
- DELETE_OBJ(props->State);
+ ALeffectState *state;
+ state = ATOMIC_LOAD(&props->State, almemory_order_relaxed);
+ DELETE_OBJ(state);
TRACE("Freed unapplied AuxiliaryEffectSlot update %p\n", props);
al_free(props);
}
@@ -560,8 +562,10 @@ void DeinitEffectSlot(ALeffectslot *slot)
while(props)
{
struct ALeffectslotProps *next;
+ ALeffectState *state;
+ state = ATOMIC_LOAD(&props->State, almemory_order_relaxed);
next = ATOMIC_LOAD(&props->next, almemory_order_relaxed);
- DELETE_OBJ(props->State);
+ DELETE_OBJ(state);
al_free(props);
props = next;
++count;