diff options
author | Chris Robinson <[email protected]> | 2011-05-29 03:04:32 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-05-29 03:04:32 -0700 |
commit | 91c3cffe419befc6d77f1b194fbf9165de7d6f19 (patch) | |
tree | 9ac2d494f4335a667455f765aa45c65d058cfa91 /Alc | |
parent | 60a55aa89714e06d547b294ae71902a72fef59c4 (diff) |
Protect the mixer while the device's context array is being updated
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1998,6 +1998,7 @@ ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCin return NULL; } + SuspendContext(NULL); ALContext = NULL; temp = realloc(device->Contexts, (device->NumContexts+1) * sizeof(*device->Contexts)); if(temp) @@ -2016,13 +2017,13 @@ ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCin { free(ALContext); alcSetError(device, ALC_OUT_OF_MEMORY); + ProcessContext(NULL); if(device->NumContexts == 0) ALCdevice_StopPlayback(device); UnlockLists(); return NULL; } - SuspendContext(NULL); device->Contexts[device->NumContexts++] = ALContext; ALContext->Device = device; |