From: Soeren Apel Date: Sun, 3 Apr 2016 18:34:01 +0000 (+0200) Subject: Session: Don't crash when session.device_ is empty X-Git-Tag: pulseview-0.4.0~325 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=076eefa4ac3ae038bbeb7b9ac3175d2159bec2d1;p=pulseview.git Session: Don't crash when session.device_ is empty --- diff --git a/pv/session.cpp b/pv/session.cpp index e2b6dd71..ebef90cb 100644 --- a/pv/session.cpp +++ b/pv/session.cpp @@ -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 lock(data_mutex_);