]> sigrok.org Git - pulseview.git/commitdiff
LogicSignal: Don't depend on device_ being valid
authorSoeren Apel <redacted>
Wed, 22 Mar 2017 19:05:38 +0000 (20:05 +0100)
committerSoeren Apel <redacted>
Wed, 22 Mar 2017 22:08:21 +0000 (23:08 +0100)
pv/view/logicsignal.cpp

index f78170b01a30a0028a95befaf7665e7d8a33e649..440a11903d4277f15d6dfeff6961630d20bfa868 100644 (file)
@@ -347,6 +347,10 @@ void LogicSignal::init_trigger_actions(QWidget *parent)
 
 const vector<int32_t> LogicSignal::get_trigger_types() const
 {
+       // We may not be associated with a device
+       if (!device_)
+               return vector<int32_t>();
+
        const auto sr_dev = device_->device();
        if (sr_dev->config_check(ConfigKey::TRIGGER_MATCH, Capability::LIST)) {
                const Glib::VariantContainerBase gvar =