X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Ftabular_decoder%2Fmodel.cpp;fp=pv%2Fviews%2Ftabular_decoder%2Fmodel.cpp;h=28467de4a3424db932b06c5f32243e91b663cc4d;hb=593ea025f22372ed6761d0cb300f0873fa1a47e7;hp=f80b0012657df46e7acf38a86610cc43d24cd326;hpb=f2739baea42501f5ad5f503f6ead9374b9253566;p=pulseview.git diff --git a/pv/views/tabular_decoder/model.cpp b/pv/views/tabular_decoder/model.cpp index f80b0012..28467de4 100644 --- a/pv/views/tabular_decoder/model.cpp +++ b/pv/views/tabular_decoder/model.cpp @@ -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;