aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-10 19:22:46 -0700
committerChris Robinson <[email protected]>2011-09-10 19:22:46 -0700
commit30510dc4782cda703fd9dacfca2349e61bf7b9b9 (patch)
tree102072b2c53fce767cbe11fc59e7e2bcf029c40c /Alc/ALu.c
parentb788ae52b0d966766d2cd56813a10c4936afe3f7 (diff)
Set the device-connected flag to false first when handling a disconnect
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 192ff686..3ce7a3b1 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -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);
}