]> sigrok.org Git - pulseview.git/commitdiff
Only update the decode state when decoding
authorJoel Holdsworth <redacted>
Mon, 3 Mar 2014 22:13:40 +0000 (22:13 +0000)
committerJoel Holdsworth <redacted>
Mon, 3 Mar 2014 22:41:41 +0000 (22:41 +0000)
pv/data/decoderstack.cpp

index c197e019fd16c6b1e1d5d35ff2aa02d62b9e2bfa..b252877b7098940c80ca7f82ba91b4466aa3246a 100644 (file)
@@ -427,7 +427,8 @@ void DecoderStack::on_data_received()
 {
        {
                unique_lock<mutex> lock(_input_mutex);
-               _sample_count = _snapshot->get_sample_count();
+               if (_snapshot)
+                       _sample_count = _snapshot->get_sample_count();
        }
        _input_cond.notify_one();
 }
@@ -436,7 +437,8 @@ void DecoderStack::on_frame_ended()
 {
        {
                unique_lock<mutex> lock(_input_mutex);
-               _frame_complete = true;
+               if (_snapshot)
+                       _frame_complete = true;
        }
        _input_cond.notify_one();
 }