]> sigrok.org Git - pulseview.git/commitdiff
SamplingBar::update_sample_rate_selector should abort if no devices is selected
authorJoel Holdsworth <redacted>
Thu, 7 Mar 2013 22:40:45 +0000 (22:40 +0000)
committerUwe Hermann <redacted>
Sat, 9 Mar 2013 10:43:03 +0000 (11:43 +0100)
pv/samplingbar.cpp

index 10b681732586fc0b555d434a0afdb1a37e4cb4e8..d3b23c0f21a7586c8acc7cd9d43c3aced74d68f0 100644 (file)
@@ -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;