From: Soeren Apel Date: Wed, 29 Apr 2020 19:32:53 +0000 (+0200) Subject: TabularDecView: Fix invalid assert() X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=593ea025f22372ed6761d0cb300f0873fa1a47e7;p=pulseview.git TabularDecView: Fix invalid assert() --- 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;