diff options
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 69da0df4..f0ac5847 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -745,7 +745,13 @@ ALAPI void ALAPIENTRY alSource3i(ALuint source, ALenum eParam, ALint lValue1, AL ALeffectslot *ALEffectSlot = (ALeffectslot*)ALTHUNK_LOOKUPENTRY(lValue1); ALfilter *ALFilter = (ALfilter*)ALTHUNK_LOOKUPENTRY(lValue3); + /* Release refcount on the previous slot, and add one for + * the new slot */ + if(pSource->Send[lValue2].Slot) + pSource->Send[lValue2].Slot->refcount--; pSource->Send[lValue2].Slot = ALEffectSlot; + if(pSource->Send[lValue2].Slot) + pSource->Send[lValue2].Slot->refcount++; if(!ALFilter) { |