aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 3c43c7a5..02e04e58 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -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;
}