projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6ed12b
)
binding::Device: Catch errors listing the config keys
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Mon, 6 Apr 2015 09:08:40 +0000
(10:08 +0100)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Thu, 11 Jun 2015 18:38:47 +0000
(20:38 +0200)
pv/binding/device.cpp
patch
|
blob
|
history
diff --git
a/pv/binding/device.cpp
b/pv/binding/device.cpp
index 32edea164144786d0ef9ad8aeab525dc99363eb8..6f9788932c8dd0d4377d98771cee69ad6b6760e3 100644
(file)
--- a/
pv/binding/device.cpp
+++ b/
pv/binding/device.cpp
@@
-56,9
+56,15
@@
namespace binding {
Device::Device(shared_ptr<sigrok::Configurable> configurable) :
configurable_(configurable)
{
-
assert(configurable)
;
+
std::map< const ConfigKey*, std::set<Capability> > 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;