aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-05-24 19:02:36 -0700
committerChris Robinson <[email protected]>2010-05-24 19:02:36 -0700
commit3d16be18221132db9a0e43a5eb2c7c314809859f (patch)
tree4f9972eec0a18c714e9d34a93e501c1619deaea4 /OpenAL32
parentad10d4ee74601f81552c3bf91701d6718fde2c60 (diff)
Fix alBufferiv error handling
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alBuffer.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index 754a5b35..759062aa 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -838,13 +838,15 @@ AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum eParam, const ALint* pl
ALCdevice *device;
ALbuffer *ALBuf;
- (void)plValues;
-
pContext = GetContextSuspended();
if(!pContext) return;
device = pContext->Device;
- if((ALBuf=LookupBuffer(device->BufferMap, buffer)) != NULL)
+ if(!plValues)
+ alSetError(pContext, AL_INVALID_VALUE);
+ else if((ALBuf=LookupBuffer(device->BufferMap, buffer)) == NULL)
+ alSetError(pContext, AL_INVALID_NAME);
+ else
{
switch(eParam)
{
@@ -873,10 +875,6 @@ AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum eParam, const ALint* pl
break;
}
}
- else
- {
- alSetError(pContext, AL_INVALID_NAME);
- }
ProcessContext(pContext);
}