Unset the local context if it's being destroyed

This commit is contained in:
Chris Robinson 2011-06-14 08:27:09 -07:00
parent 5a15dc4ddf
commit 1babf28491

View File

@ -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;