Commit a84bcf59 authored by Max Kellermann's avatar Max Kellermann

input/cdio: handle cdio_open() failure

parent 4bbd4ba8
......@@ -197,6 +197,11 @@ input_cdio_open(const char *uri,
/* Found such a CD-ROM with a CD-DA loaded. Use the first drive in the list. */
i->cdio = cdio_open(device.c_str(), DRIVER_UNKNOWN);
if (i->cdio == nullptr) {
error.Set(cdio_domain, "Failed to open CD drive");
delete i;
return nullptr;
}
i->drv = cdio_cddap_identify_cdio(i->cdio, 1, nullptr);
......
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