summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-08-16 11:12:13 -0700
committerChris Robinson <[email protected]>2009-08-16 11:12:13 -0700
commit0b5a0d1e7970fbaa310f8579d33379b481e78715 (patch)
treec071020bc0eb6ce12140a8e509831ac2217a200b
parent0b7eb9f118a259f4bc666140093b6be7dcf01158 (diff)
Reset the target if the databuffer being deleted is currently selected
-rw-r--r--OpenAL32/alDatabuffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenAL32/alDatabuffer.c b/OpenAL32/alDatabuffer.c
index 5b285b8d..2eed1d8e 100644
--- a/OpenAL32/alDatabuffer.c
+++ b/OpenAL32/alDatabuffer.c
@@ -151,6 +151,11 @@ ALvoid ALAPIENTRY alDeleteDatabuffersEXT(ALsizei n, const ALuint *puiBuffers)
if(*list)
*list = (*list)->next;
+ if(ALBuf == Context->SampleSource)
+ Context->SampleSource = NULL;
+ if(ALBuf == Context->SampleSink)
+ Context->SampleSink = NULL;
+
// Release the memory used to store audio data
free(ALBuf->data);