diff options
author | Chris Robinson <[email protected]> | 2011-06-17 23:59:25 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-06-17 23:59:25 -0700 |
commit | 0d39ac652889bc2ecea0286fe24fcdcd6c04995e (patch) | |
tree | d21b0a88ed08e2901c5e5a6049705fb64a9d8247 /OpenAL32/alSource.c | |
parent | 157e1394d6d3d32630d287a9725396ec4dff24bb (diff) |
Allow alThunkAddEntry to return a proper error
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index c50e648c..ec730040 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -86,9 +86,9 @@ AL_API ALvoid AL_APIENTRY alGenSources(ALsizei n,ALuint *sources) break; } - source->source = (ALuint)ALTHUNK_ADDENTRY(source); - err = InsertUIntMapEntry(&Context->SourceMap, source->source, - source); + err = ALTHUNK_ADDENTRY(source, &source->source); + if(err == AL_NO_ERROR) + err = InsertUIntMapEntry(&Context->SourceMap, source->source, source); if(err != AL_NO_ERROR) { ALTHUNK_REMOVEENTRY(source->source); |