]> sigrok.org Git - pulseview.git/commitdiff
TabularDecView: Fix invalid assert()
authorSoeren Apel <redacted>
Wed, 29 Apr 2020 19:32:53 +0000 (21:32 +0200)
committerUwe Hermann <redacted>
Sun, 3 May 2020 15:20:55 +0000 (17:20 +0200)
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;