Commit 8eb31648 authored by Max Kellermann's avatar Max Kellermann

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.
parent 915c5442
ver 0.23.8 (not yet released) ver 0.23.8 (not yet released)
* storage * storage
- curl: fix crash if web server does not understand WebDAV - curl: fix crash if web server does not understand WebDAV
* input
- cdio_paranoia: fix crash if no drive was found
* output * output
- pipewire: fix crash with PipeWire 0.3.53 - pipewire: fix crash with PipeWire 0.3.53
* mixer * mixer
......
...@@ -176,6 +176,9 @@ cdio_detect_device() ...@@ -176,6 +176,9 @@ cdio_detect_device()
AtScopeExit(devices) { cdio_free_device_list(devices); }; AtScopeExit(devices) { cdio_free_device_list(devices); };
if (devices[0] == nullptr)
return nullptr;
return AllocatedPath::FromFS(devices[0]); return AllocatedPath::FromFS(devices[0]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment