From: Joel Holdsworth Date: Mon, 29 Apr 2013 17:22:54 +0000 (+0100) Subject: Added assertions to confirm that the session was terminated cleanly X-Git-Tag: pulseview-0.1.0~10 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=1a2fe44c9099b43a0235cda497f81b2298782b63;p=pulseview.git Added assertions to confirm that the session was terminated cleanly --- diff --git a/pv/sigsession.cpp b/pv/sigsession.cpp index c5a7d494..4fe51dd5 100644 --- a/pv/sigsession.cpp +++ b/pv/sigsession.cpp @@ -166,6 +166,10 @@ void SigSession::load_thread_proc(const string name, sr_session_destroy(); set_capture_state(Stopped); + + // Confirm that SR_DF_END was received + assert(!_cur_logic_snapshot); + assert(!_cur_analog_snapshot); } void SigSession::sample_thread_proc(struct sr_dev_inst *sdi, @@ -204,6 +208,10 @@ void SigSession::sample_thread_proc(struct sr_dev_inst *sdi, sr_session_destroy(); set_capture_state(Stopped); + + // Confirm that SR_DF_END was received + assert(!_cur_logic_snapshot); + assert(!_cur_analog_snapshot); } void SigSession::feed_in_header(const sr_dev_inst *sdi)