]> sigrok.org Git - pulseview.git/blobdiff - pv/popups/channels.cpp
Channel popup: Don't use exceptions
[pulseview.git] / pv / popups / channels.cpp
index 842a19d29305ba3db38de9a43f096ba22da45490..ecdc59a35466cd82f378cd1393f5f366bb091ccf 100644 (file)
@@ -333,11 +333,9 @@ void Channels::showEvent(QShowEvent *event)
        for (auto& entry : device->channel_groups()) {
                const shared_ptr<ChannelGroup> group = entry.second;
 
-               try {
-                       QLabel* label = group_label_map_.at(group);
+               if (group_label_map_.count(group) > 0) {
+                       QLabel* label = group_label_map_[group];
                        label->setText(QString("<h3>%1</h3>").arg(group->name().c_str()));
-               } catch (out_of_range&) {
-                       // Do nothing
                }
        }