]> sigrok.org Git - pulseview.git/commitdiff
AnalogSignal: Don't paint logic when there's no logic data
authorSoeren Apel <redacted>
Sun, 23 Apr 2017 14:44:17 +0000 (16:44 +0200)
committerUwe Hermann <redacted>
Fri, 5 May 2017 13:22:54 +0000 (15:22 +0200)
pv/view/analogsignal.cpp

index b9d73126527a3f0a1820d8ce60a94e228a42fd14..5777628747cd550b8b3624567b3a65407c8fe07f 100644 (file)
@@ -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<pv::data::LogicSegment> > &segments =
                base_->logic_data()->logic_segments();
+
        if (segments.empty())
                return;