Set the device-connected flag to false first when handling a disconnect

This commit is contained in:
Chris Robinson
2011-09-10 19:22:46 -07:00
parent b788ae52b0
commit 30510dc478
+2 -2
View File
@@ -1093,6 +1093,8 @@ ALvoid aluHandleDisconnect(ALCdevice *device)
ALCcontext *Context;
LockDevice(device);
device->Connected = ALC_FALSE;
Context = device->ContextList;
while(Context)
{
@@ -1115,7 +1117,5 @@ ALvoid aluHandleDisconnect(ALCdevice *device)
Context = Context->next;
}
device->Connected = ALC_FALSE;
UnlockDevice(device);
}