From: Joel Holdsworth Date: Thu, 7 Mar 2013 22:40:45 +0000 (+0000) Subject: SamplingBar::update_sample_rate_selector should abort if no devices is selected X-Git-Tag: pulseview-0.1.0~99 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ef4d020135822a8acb5a19475bcd7dc5c841fa04;p=pulseview.git SamplingBar::update_sample_rate_selector should abort if no devices is selected --- diff --git a/pv/samplingbar.cpp b/pv/samplingbar.cpp index 10b68173..d3b23c0f 100644 --- a/pv/samplingbar.cpp +++ b/pv/samplingbar.cpp @@ -177,6 +177,9 @@ void SamplingBar::update_sample_rate_selector() assert(_sample_rate_value_action); assert(_sample_rate_list_action); + if (!sdi) + return; + if (sr_config_list(sdi->driver, SR_CONF_SAMPLERATE, (const void **)&samplerates, sdi) != SR_OK) return;