aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alDatabuffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenAL32/alDatabuffer.c b/OpenAL32/alDatabuffer.c
index 29c13ebb..b7de80db 100644
--- a/OpenAL32/alDatabuffer.c
+++ b/OpenAL32/alDatabuffer.c
@@ -547,7 +547,8 @@ ALvoid ALAPIENTRY alSelectDatabufferEXT(ALenum target, ALuint uiBuffer)
if(!pContext) return;
Device = pContext->Device;
- if((pBuffer=VerifyDatabuffer(Device->DatabufferList, uiBuffer)) != NULL)
+ if(uiBuffer == 0 ||
+ (pBuffer=VerifyDatabuffer(Device->DatabufferList, uiBuffer)) != NULL)
{
if(target == AL_SAMPLE_SOURCE_EXT)
pContext->SampleSource = pBuffer;