X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=afc2aefae97c3aab8f0e81d94cf982c09b4ff9da;hb=dae407df004b28e360bd9fb52590063652b29811;hp=122b708f6e74fdfb0b6b6241442c96aca4eb9a39;hpb=500634bebf68d5a018f2d9c36a104b8706f59818;p=babeltrace.git diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 122b708f..afc2aefa 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -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: