projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix double-free issue in File::create
[pulseview.git]
/
pv
/
toolbars
/
samplingbar.cpp
diff --git
a/pv/toolbars/samplingbar.cpp
b/pv/toolbars/samplingbar.cpp
index 526f382ce402e7e07979ef722e3cba498af3c0fa..c34373776ca572ca101465a2fc73bfff2ab2cf80 100644
(file)
--- a/
pv/toolbars/samplingbar.cpp
+++ b/
pv/toolbars/samplingbar.cpp
@@
-339,13
+339,15
@@
void SamplingBar::update_device_config_widgets()
gvar, &num_opts, sizeof(int32_t));
for (unsigned int i = 0; i < num_opts; i++)
{
gvar, &num_opts, sizeof(int32_t));
for (unsigned int i = 0; i < num_opts; i++)
{
- switch (options[i]) {
+ switch (options[i]
& SR_CONF_MASK
) {
case SR_CONF_LIMIT_SAMPLES:
case SR_CONF_LIMIT_SAMPLES:
- _sample_count_supported = true;
+ if (options[i] & SR_CONF_SET)
+ _sample_count_supported = true;
break;
case SR_CONF_LIMIT_FRAMES:
break;
case SR_CONF_LIMIT_FRAMES:
- dev_inst->set_config(NULL, SR_CONF_LIMIT_FRAMES,
- g_variant_new_uint64(1));
+ if (options[i] & SR_CONF_SET)
+ dev_inst->set_config(NULL, SR_CONF_LIMIT_FRAMES,
+ g_variant_new_uint64(1));
break;
}
}
break;
}
}