X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fbinding%2Fdevice.cpp;h=6f9788932c8dd0d4377d98771cee69ad6b6760e3;hb=4c60462b00cc329e61daedd1c2e66724077bd412;hp=32edea164144786d0ef9ad8aeab525dc99363eb8;hpb=198f9bc74d6c955a72e3e3282c2b0ba16ef39a62;p=pulseview.git diff --git a/pv/binding/device.cpp b/pv/binding/device.cpp index 32edea1..6f97889 100644 --- a/pv/binding/device.cpp +++ b/pv/binding/device.cpp @@ -56,9 +56,15 @@ namespace binding { Device::Device(shared_ptr configurable) : configurable_(configurable) { - assert(configurable); + std::map< const ConfigKey*, std::set > keys; - for (auto entry : configurable->config_keys(ConfigKey::DEVICE_OPTIONS)) { + try { + keys = configurable->config_keys(ConfigKey::DEVICE_OPTIONS); + } catch (const Error) { + return; + } + + for (auto entry : keys) { auto key = entry.first; auto capabilities = entry.second;