X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fsigsession.cpp;h=6c9b57f84ac1e9492d321b606144643dc1acad3e;hb=82596f463e2ef38d149421157f9ebd62bad5872d;hp=8cfd86d9a9782fc340c6fdebf9103d8edba96c3c;hpb=269528f55e7fd77f762c2008d257921cd30e1519;p=pulseview.git diff --git a/pv/sigsession.cpp b/pv/sigsession.cpp index 8cfd86d..6c9b57f 100644 --- a/pv/sigsession.cpp +++ b/pv/sigsession.cpp @@ -85,6 +85,9 @@ struct sr_dev_inst* SigSession::get_device() const void SigSession::set_device(struct sr_dev_inst *sdi) { + // Ensure we are not capturing before setting the device + stop_capture(); + if (_sdi) _device_manager.release_device(_sdi); if (sdi)