aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/input/plugins/CdioParanoiaInputPlugin.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input/plugins/CdioParanoiaInputPlugin.cxx b/src/input/plugins/CdioParanoiaInputPlugin.cxx
index 19fd33913..1d39a1cc3 100644
--- a/src/input/plugins/CdioParanoiaInputPlugin.cxx
+++ b/src/input/plugins/CdioParanoiaInputPlugin.cxx
@@ -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);