mirror of
https://github.com/Ryujinx/libsoundio.git
synced 2024-12-22 19:45:38 +00:00
Fix incorrectly returning the same error in multiple error cases
This commit is contained in:
parent
b88355eaaf
commit
f9444b089b
|
@ -716,7 +716,7 @@ static int refresh_devices(struct SoundIoPrivate *si) {
|
||||||
if(hr == E_OUTOFMEMORY) {
|
if(hr == E_OUTOFMEMORY) {
|
||||||
return SoundIoErrorNoMem;
|
return SoundIoErrorNoMem;
|
||||||
}
|
}
|
||||||
return SoundIoErrorNoMem;
|
return SoundIoErrorOpeningDevice;
|
||||||
}
|
}
|
||||||
if ((err = from_lpwstr(rd.lpwstr, &rd.default_capture_id, &rd.default_capture_id_len))) {
|
if ((err = from_lpwstr(rd.lpwstr, &rd.default_capture_id, &rd.default_capture_id_len))) {
|
||||||
deinit_refresh_devices(&rd);
|
deinit_refresh_devices(&rd);
|
||||||
|
|
Loading…
Reference in a new issue