]> sigrok.org Git - pulseview.git/commitdiff
Session: Don't crash when session.device_ is empty
authorSoeren Apel <redacted>
Sun, 3 Apr 2016 18:34:01 +0000 (20:34 +0200)
committerSoeren Apel <redacted>
Sun, 3 Apr 2016 18:34:01 +0000 (20:34 +0200)
pv/session.cpp

index e2b6dd7174a0bcdfcadef6ab0041454ab4a2a8c0..ebef90cbb6590fb9961fad97f73047e56e8acc79 100644 (file)
@@ -338,7 +338,11 @@ void Session::set_capture_state(capture_state state)
 
 void Session::update_signals()
 {
-       assert(device_);
+       if (!device_) {
+               signals_.clear();
+               logic_data_.reset();
+               return;
+       }
 
        lock_guard<recursive_mutex> lock(data_mutex_);