projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4871ed9
)
DeviceOptions: Added an error handler for the case when a device exposes an enum...
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 23 Mar 2014 14:24:58 +0000
(14:24 +0000)
committer
Bert Vermeulen
<bert@biot.com>
Thu, 27 Mar 2014 09:57:33 +0000
(10:57 +0100)
pv/prop/binding/deviceoptions.cpp
patch
|
blob
|
history
diff --git
a/pv/prop/binding/deviceoptions.cpp
b/pv/prop/binding/deviceoptions.cpp
index 863c19c00a66e2c0e82edadbfee45384366a6331..2dc237a885ec6eec83f9efbdde0654ef0aa9b049 100644
(file)
--- a/
pv/prop/binding/deviceoptions.cpp
+++ b/
pv/prop/binding/deviceoptions.cpp
@@
-22,6
+22,8
@@
#include <stdint.h>
+#include <QDebug>
+
#include "deviceoptions.h"
#include <pv/device/devinst.h>
@@
-135,7
+137,11
@@
void DeviceOptions::bind_enum(const QString &name, int key,
vector< pair<GVariant*, QString> > values;
assert(_dev_inst);
- assert(gvar_list);
+ if (!gvar_list) {
+ qDebug() << "Config key " << key << " was listed, but no "
+ "options were given";
+ return;
+ }
g_variant_iter_init (&iter, gvar_list);
while ((gvar = g_variant_iter_next_value (&iter)))