Reset the target if the databuffer being deleted is currently selected
This commit is contained in:
parent
0b7eb9f118
commit
0b5a0d1e79
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user