From: Joel Holdsworth Date: Wed, 26 Feb 2014 21:45:30 +0000 (+0100) Subject: Don't attempt to set SR_CONF_LIMIT_SAMPLES when it's not supported X-Git-Tag: pulseview-0.2.0~46 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3668e2fe35956801bc3f89de2dabcddf98e19179;p=pulseview.git Don't attempt to set SR_CONF_LIMIT_SAMPLES when it's not supported --- diff --git a/pv/toolbars/samplingbar.cpp b/pv/toolbars/samplingbar.cpp index 78f6e1ce..be29e74b 100644 --- a/pv/toolbars/samplingbar.cpp +++ b/pv/toolbars/samplingbar.cpp @@ -316,7 +316,8 @@ void SamplingBar::commit_sample_count() // Set the sample count assert(!_updating_sample_count); _updating_sample_count = true; - if (!dev_inst->set_config(NULL, SR_CONF_LIMIT_SAMPLES, + if (_sample_count_supported && + !dev_inst->set_config(NULL, SR_CONF_LIMIT_SAMPLES, g_variant_new_uint64(sample_count))) { qDebug() << "Failed to configure sample count."; return;