From: Soeren Apel Date: Wed, 22 Mar 2017 19:05:38 +0000 (+0100) Subject: LogicSignal: Don't depend on device_ being valid X-Git-Tag: pulseview-0.4.0~133 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3afe5afea4536c613f814fc094088c2074c74915;p=pulseview.git LogicSignal: Don't depend on device_ being valid --- diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index f78170b0..440a1190 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -347,6 +347,10 @@ void LogicSignal::init_trigger_actions(QWidget *parent) const vector LogicSignal::get_trigger_types() const { + // We may not be associated with a device + if (!device_) + return vector(); + const auto sr_dev = device_->device(); if (sr_dev->config_check(ConfigKey::TRIGGER_MATCH, Capability::LIST)) { const Glib::VariantContainerBase gvar =