diff options
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); |