diff options
author | Chris Robinson <[email protected]> | 2009-09-21 23:31:04 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-09-21 23:31:04 -0700 |
commit | 8ea8b49464419af80c860740339cea33eee05712 (patch) | |
tree | 659aba2bbe60dee0ed6fb21d19fdb178747f39c9 | |
parent | 62cef44dcbb5368d383e45ba6201e0bfbce09612 (diff) |
Avoid locking a NULL context when a device is disconnected
-rw-r--r-- | Alc/ALu.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1381,14 +1381,13 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size) ALvoid aluHandleDisconnect(ALCdevice *device) { - if(!device->IsCaptureDevice) + if(device->Context) { - ALsource *source = NULL; + ALsource *source; SuspendContext(device->Context); - if(device->Context) - source = device->Context->Source; + source = device->Context->Source; while(source) { if(source->state == AL_PLAYING) |