]> sigrok.org Git - pulseview.git/commitdiff
Check for device instances before blindly trying to release them.
authorBert Vermeulen <redacted>
Sun, 3 Aug 2014 12:24:02 +0000 (14:24 +0200)
committerBert Vermeulen <redacted>
Sun, 3 Aug 2014 12:24:02 +0000 (14:24 +0200)
pv/sigsession.cpp

index d89ca61c0d0d44863e180df07da6ac0802713f1c..201892889abf97d05823529d8d3cf7e191eb0a2b 100644 (file)
@@ -83,7 +83,8 @@ SigSession::~SigSession()
        // Stop and join to the thread
        stop_capture();
 
        // 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;
 
        // TODO: This should not be necessary
        _session = NULL;