aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 391cfe11..a7cb9e92 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1803,12 +1803,13 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
{
enum DevFmtChannels chans;
ALCuint freq;
-
- FindHrtfFormat(device, &chans, &freq);
- device->Frequency = freq;
- device->FmtChans = chans;
- device->Flags |= DEVICE_CHANNELS_REQUEST |
- DEVICE_FREQUENCY_REQUEST;
+ if(FindHrtfFormat(device, &chans, &freq))
+ {
+ device->Frequency = freq;
+ device->FmtChans = chans;
+ device->Flags |= DEVICE_CHANNELS_REQUEST |
+ DEVICE_FREQUENCY_REQUEST;
+ }
}
if(V0(device->Backend,reset)() == ALC_FALSE)