]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decoderstack.cpp
Do not attempt to decode when required probes have not been specified
[pulseview.git] / pv / data / decoderstack.cpp
index 073dcd523ec44146fb067cadd9957d5c523f2d76..74ad7d362d0b2fe1e93dc31e928202b06689d23c 100644 (file)
@@ -246,11 +246,17 @@ void DecoderStack::decode_proc(shared_ptr<data::Logic> data)
 
        assert(data);
 
+       // Check we have a snapshot of data
        const deque< shared_ptr<pv::data::LogicSnapshot> > &snapshots =
                data->get_snapshots();
        if (snapshots.empty())
                return;
 
+       // Check that all decoders have the required probes
+       BOOST_FOREACH(const shared_ptr<decode::Decoder> &dec, _stack)
+               if (!dec->have_required_probes())
+                       return;
+
        const shared_ptr<pv::data::LogicSnapshot> &snapshot =
                snapshots.front();
        const int64_t sample_count = snapshot->get_sample_count();