diff options
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r-- | OpenAL32/alBuffer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index b906da14..9f12128e 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -104,7 +104,10 @@ AL_API ALvoid AL_APIENTRY alDeleteBuffers(ALsizei n, const ALuint *buffers) } for(i = 0;i < n;i++) - DeleteBuffer(device, buffers[i]); + { + if((ALBuf=LookupBuffer(device, buffers[i])) != NULL) + DeleteBuffer(device, ALBuf); + } done: ALCcontext_DecRef(context); @@ -1294,12 +1297,9 @@ ALbuffer *NewBuffer(ALCcontext *context) return buffer; } -void DeleteBuffer(ALCdevice *device, ALuint bufid) +void DeleteBuffer(ALCdevice *device, ALbuffer *buffer) { - ALbuffer *buffer; - - if((buffer=RemoveBuffer(device, bufid)) == NULL) - return; + RemoveBuffer(device, buffer->id); FreeThunkEntry(buffer->id); free(buffer->data); |