aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index abd2a01f..33580dad 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2474,7 +2474,11 @@ ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCin
UnlockLists();
alcSetError(device, err);
if(err == ALC_INVALID_DEVICE)
+ {
+ ALCdevice_Lock(device);
aluHandleDisconnect(device);
+ ALCdevice_Unlock(device);
+ }
ALCdevice_DecRef(device);
return NULL;
}