diff options
-rw-r--r-- | Alc/alc.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 9b4c2978..6bd755bf 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -1888,8 +1888,14 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) (device->Flags&DEVICE_FREQUENCY_REQUEST)?"*":"", device->Frequency, device->UpdateSize, device->BufferSize); - if(device->Backend->reset() == ALC_FALSE) + try { + if(device->Backend->reset() == ALC_FALSE) + return ALC_INVALID_DEVICE; + } + catch(std::exception &e) { + ERR("Device reset failed: %s\n", e.what()); return ALC_INVALID_DEVICE; + } if(device->FmtChans != oldChans && (device->Flags&DEVICE_CHANNELS_REQUEST)) { |