Fix: accept traces which skip stream ids
[babeltrace.git] / formats / ctf / ctf.c
index e3a487d6ef969f0ad2cd97c2ba360bb3a76c0937..5dce5f5a5dcb0c3033a1179a5acccdbcfa8542fe 100644 (file)
@@ -147,6 +147,8 @@ uint64_t ctf_timestamp_begin(struct trace_descriptor *descriptor,
                struct ctf_stream_declaration *stream_class;
 
                stream_class = g_ptr_array_index(tin->streams, i);
+               if (!stream_class)
+                       continue;
                /* for each file_stream */
                for (j = 0; j < stream_class->streams->len; j++) {
                        struct ctf_stream_definition *stream;
@@ -190,6 +192,8 @@ uint64_t ctf_timestamp_end(struct trace_descriptor *descriptor,
                struct ctf_stream_declaration *stream_class;
 
                stream_class = g_ptr_array_index(tin->streams, i);
+               if (!stream_class)
+                       continue;
                /* for each file_stream */
                for (j = 0; j < stream_class->streams->len; j++) {
                        struct ctf_stream_definition *stream;
This page took 0.02388 seconds and 4 git commands to generate.