aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-06-14 08:27:09 -0700
committerChris Robinson <[email protected]>2011-06-14 08:27:09 -0700
commit1babf2849162d6f7d0f232dfc47888d7077fb356 (patch)
tree1648939d751e5762afec4264d73f0aa2d794be3f /Alc/ALc.c
parent5a15dc4ddf40ef547f7a776454488490c97f8d7f (diff)
Unset the local context if it's being destroyed
Diffstat (limited to 'Alc/ALc.c')
-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;