diff options
author | Chris Robinson <[email protected]> | 2010-07-21 14:50:39 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-07-21 14:50:39 -0700 |
commit | 88f236ccd3f2e75d0823414e8c9a4492ddbd2539 (patch) | |
tree | 5a14a9b486a2a07566858a4691d53cf79737f1ca /Alc | |
parent | 34a0c998cd849ab40a1e6325b37ca53c2740c355 (diff) |
Make sure the device is stopped if there was an error setting up the first context
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1612,6 +1612,8 @@ ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCin { alcSetError(device, ALC_OUT_OF_MEMORY); ProcessContext(NULL); + if(device->NumContexts == 0) + ALCdevice_StopPlayback(device); return NULL; } device->Contexts = temp; @@ -1628,6 +1630,8 @@ 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); return NULL; } |