aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--OpenAL32/alSource.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 73b298a4..f48ef304 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -122,7 +122,7 @@ ALAPI ALvoid ALAPIENTRY alDeleteSources(ALsizei n, const ALuint *sources)
ALCdevice *Device;
ALsource *ALSource;
ALsource **list;
- ALsizei i;
+ ALsizei i, j;
ALbufferlistitem *ALBufferList;
ALboolean bSourcesValid = AL_TRUE;
@@ -174,6 +174,13 @@ ALAPI ALvoid ALAPIENTRY alDeleteSources(ALsizei n, const ALuint *sources)
free(ALBufferList);
}
+ for(j = 0;j < MAX_SENDS;++j)
+ {
+ if(ALSource->Send[j].Slot)
+ ALSource->Send[j].Slot->refcount--;
+ ALSource->Send[j].Slot = NULL;
+ }
+
// Decrement Source count
Context->SourceCount--;