]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decode/row.cpp
Row: Include fix
[pulseview.git] / pv / data / decode / row.cpp
index e5972517a446bc7a47b0ba3a6238e257b91b8114..f1895ae4ef7c71bb100c46d645fc356cc4d78b57 100644 (file)
@@ -17,6 +17,8 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <cassert>
+
 #include "decoder.hpp"
 #include "row.hpp"
 
@@ -75,11 +77,17 @@ const QString Row::description() const
 
 vector<AnnotationClass*> Row::ann_classes() const
 {
+       assert(decoder_);
+
        vector<AnnotationClass*> result;
 
-       if (!srd_row_)
+       if (!srd_row_) {
+               if (index_ == 0) {
+                       // When operating as the fallback row, all annotation classes belong to it
+                       return decoder_->ann_classes();
+               }
                return result;
-       assert(decoder_);
+       }
 
        for (GSList *l = srd_row_->ann_classes; l; l = l->next) {
                size_t class_id = (size_t)l->data;