From: Soeren Apel Date: Sun, 23 Apr 2017 14:44:17 +0000 (+0200) Subject: AnalogSignal: Don't paint logic when there's no logic data X-Git-Tag: pulseview-0.4.0~92 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6c0df7c482e0351f7b0cb0b8cbe0d92f77f08980;p=pulseview.git AnalogSignal: Don't paint logic when there's no logic data --- diff --git a/pv/view/analogsignal.cpp b/pv/view/analogsignal.cpp index b9d73126..57776287 100644 --- a/pv/view/analogsignal.cpp +++ b/pv/view/analogsignal.cpp @@ -430,7 +430,7 @@ void AnalogSignal::paint_logic_mid(QPainter &p, ViewItemPaintParams &pp) const int y = get_visual_y(); - if (!base_->enabled()) + if (!base_->enabled() || !base_->logic_data()) return; const int signal_margin = @@ -443,6 +443,7 @@ void AnalogSignal::paint_logic_mid(QPainter &p, ViewItemPaintParams &pp) const deque< shared_ptr > &segments = base_->logic_data()->logic_segments(); + if (segments.empty()) return;