aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALc.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 1b28dabb..5b26c09d 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -3675,17 +3675,18 @@ ALC_API void ALC_APIENTRY alcDeviceResumeSOFT(ALCdevice *device)
LockLists();
if((device->Flags&DEVICE_PAUSED))
{
- if(V0(device->Backend,start)() != ALC_FALSE)
+ device->Flags &= ~DEVICE_PAUSED;
+ if(device->ContextList != NULL)
{
- device->Flags |= DEVICE_RUNNING;
- device->Flags &= ~DEVICE_PAUSED;
- }
- else
- {
- alcSetError(device, ALC_INVALID_DEVICE);
- ALCdevice_Lock(device);
- aluHandleDisconnect(device);
- ALCdevice_Unlock(device);
+ if(V0(device->Backend,start)() != ALC_FALSE)
+ device->Flags |= DEVICE_RUNNING;
+ else
+ {
+ alcSetError(device, ALC_INVALID_DEVICE);
+ ALCdevice_Lock(device);
+ aluHandleDisconnect(device);
+ ALCdevice_Unlock(device);
+ }
}
}
UnlockLists();