input/CdioParanoia: fix crash if no drive was found
cdio_get_devices_with_cap() can return nullptr if no drive was found, or it can instead return an empty list. The latter caused MPD to crash.
This commit is contained in:
parent
915c5442d1
commit
8eb3164878
2
NEWS
2
NEWS
|
@ -1,6 +1,8 @@
|
|||
ver 0.23.8 (not yet released)
|
||||
* storage
|
||||
- curl: fix crash if web server does not understand WebDAV
|
||||
* input
|
||||
- cdio_paranoia: fix crash if no drive was found
|
||||
* output
|
||||
- pipewire: fix crash with PipeWire 0.3.53
|
||||
* mixer
|
||||
|
|
|
@ -176,6 +176,9 @@ cdio_detect_device()
|
|||
|
||||
AtScopeExit(devices) { cdio_free_device_list(devices); };
|
||||
|
||||
if (devices[0] == nullptr)
|
||||
return nullptr;
|
||||
|
||||
return AllocatedPath::FromFS(devices[0]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue