aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alBuffer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-06-17 23:59:25 -0700
committerChris Robinson <[email protected]>2011-06-17 23:59:25 -0700
commit0d39ac652889bc2ecea0286fe24fcdcd6c04995e (patch)
treed21b0a88ed08e2901c5e5a6049705fb64a9d8247 /OpenAL32/alBuffer.c
parent157e1394d6d3d32630d287a9725396ec4dff24bb (diff)
Allow alThunkAddEntry to return a proper error
Diffstat (limited to 'OpenAL32/alBuffer.c')
-rw-r--r--OpenAL32/alBuffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c
index ac3a85af..9e245eef 100644
--- a/OpenAL32/alBuffer.c
+++ b/OpenAL32/alBuffer.c
@@ -161,8 +161,9 @@ AL_API ALvoid AL_APIENTRY alGenBuffers(ALsizei n, ALuint *buffers)
break;
}
- buffer->buffer = (ALuint)ALTHUNK_ADDENTRY(buffer);
- err = InsertUIntMapEntry(&device->BufferMap, buffer->buffer, buffer);
+ err = ALTHUNK_ADDENTRY(buffer, &buffer->buffer);
+ if(err == AL_NO_ERROR)
+ err = InsertUIntMapEntry(&device->BufferMap, buffer->buffer, buffer);
if(err != AL_NO_ERROR)
{
ALTHUNK_REMOVEENTRY(buffer->buffer);