From: Soeren Apel <[email protected]>

---
 pv/mainwindow.cpp    |    4 ++++
 pv/popups/probes.cpp |    4 +++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp
index 1f683f1..50cab69 100644
--- a/pv/mainwindow.cpp
+++ b/pv/mainwindow.cpp
@@ -282,6 +282,10 @@ void MainWindow::update_device_list()
 
        shared_ptr<pv::device::DevInst> selected_device = _session.get_device();
        list< shared_ptr<device::DevInst> > devices;
+
+       if (_device_manager.devices().size() == 0)
+               return;
+
        std::copy(_device_manager.devices().begin(),
                _device_manager.devices().end(), std::back_inserter(devices));
 
diff --git a/pv/popups/probes.cpp b/pv/popups/probes.cpp
index f8fa970..fc069b8 100644
--- a/pv/popups/probes.cpp
+++ b/pv/popups/probes.cpp
@@ -82,7 +82,9 @@ Probes::Probes(SigSession &session, QWidget *parent) :
                        assert(probe);
 
                        const auto iter = signal_map.find(probe);
-                       assert(iter != signal_map.end());
+
+                       if (iter == signal_map.end())
+                               break;
 
                        group_sigs.push_back((*iter).second);
                        signal_map.erase(iter);
-- 
1.7.8.6


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to