Fix incorrectly returning the same error in multiple error cases

This commit is contained in:
Jacques Heunis 2016-09-16 22:46:14 +02:00 committed by Andrew Kelley
parent 29555645eb
commit eef66c5d34

View file

@ -718,7 +718,7 @@ static int refresh_devices(struct SoundIoPrivate *si) {
if(hr == E_OUTOFMEMORY) {
return SoundIoErrorNoMem;
}
return SoundIoErrorNoMem;
return SoundIoErrorOpeningDevice;
}
if ((err = from_lpwstr(rd.lpwstr, &rd.default_capture_id, &rd.default_capture_id_len))) {
deinit_refresh_devices(&rd);