Fix: import index containing only a header
[babeltrace.git] / formats / ctf / ctf.c
index 122b708f6e74fdfb0b6b6241442c96aca4eb9a39..afc2aefae97c3aab8f0e81d94cf982c09b4ff9da 100644 (file)
@@ -1886,6 +1886,12 @@ int import_stream_packet_index(struct ctf_trace *td,
                g_array_append_val(file_stream->pos.packet_cycles_index, index);
        }
 
+       /* Index containing only the header. */
+       if (!file_stream->parent.stream_class) {
+               ret = -1;
+               goto error;
+       }
+
        ret = 0;
 
 error:
This page took 0.024061 seconds and 4 git commands to generate.