From 1babf2849162d6f7d0f232dfc47888d7077fb356 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 14 Jun 2011 08:27:09 -0700 Subject: Unset the local context if it's being destroyed --- Alc/ALc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Alc/ALc.c') 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; -- cgit v1.2.3