aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index b56536c8..57b7ab37 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2205,6 +2205,8 @@ ALC_API ALCvoid ALC_APIENTRY alcDestroyContext(ALCcontext *context)
if(Device->NumContexts == 1)
ALCdevice_StopPlayback(Device);
+ if(context == tls_get(LocalContext))
+ tls_set(LocalContext, NULL);
if(context == GlobalContext)
GlobalContext = NULL;