DecoderSelector: Fix catching polymorphic types by value.
[pulseview.git] / pv / subwindows / decoder_selector / item.cpp
index 00c469e062ceaea8f1c1a1e4a456ce6276aabad1..417c5bfbbe95e98d26448a0b02809de477c329c0 100644 (file)
@@ -41,7 +41,7 @@ shared_ptr<DecoderCollectionItem> DecoderCollectionItem::subItem(int row) const
 {
        try {
                return subItems_.at(row);
-       } catch (out_of_range) {
+       } catch (out_of_range&) {
                return nullptr;
        }
 }
@@ -85,7 +85,7 @@ QVariant DecoderCollectionItem::data(int column) const
 {
        try {
                return data_.at(column);
-       } catch (out_of_range) {
+       } catch (out_of_range&) {
                return QVariant();
        }
 }