]> sigrok.org Git - pulseview.git/blobdiff - pv/views/tabular_decoder/model.cpp
TabularDecView: Fix invalid assert()
[pulseview.git] / pv / views / tabular_decoder / model.cpp
index f80b0012657df46e7acf38a86610cc43d24cd326..28467de4a3424db932b06c5f32243e91b663cc4d 100644 (file)
@@ -130,10 +130,9 @@ QModelIndex AnnotationCollectionModel::index(int row, int column,
        const QModelIndex& parent_idx) const
 {
        (void)parent_idx;
-       assert(row >= 0);
        assert(column >= 0);
 
-       if (!dataset_)
+       if (!dataset_ || (row < 0))
                return QModelIndex();
 
        QModelIndex idx;