X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fsigsession.cpp;h=ac9c052b3bf9b8d50e66adac02efc670359fac4d;hb=ab973f4729258b729d2aa84abfa14b61609fa35e;hp=d89ca61c0d0d44863e180df07da6ac0802713f1c;hpb=bb3030b34e44733036acdfe5b4d4ec0705146831;p=pulseview.git diff --git a/pv/sigsession.cpp b/pv/sigsession.cpp index d89ca61..ac9c052 100644 --- a/pv/sigsession.cpp +++ b/pv/sigsession.cpp @@ -83,7 +83,8 @@ SigSession::~SigSession() // Stop and join to the thread stop_capture(); - _dev_inst->release(); + if (_dev_inst) + _dev_inst->release(); // TODO: This should not be necessary _session = NULL; @@ -99,6 +100,9 @@ void SigSession::set_device( { using pv::device::Device; + if (!dev_inst) + return; + // Ensure we are not capturing before setting the device stop_capture();