From 1b01ffc2b946034c69e481882ef671dbe5dac14d Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 29 May 2012 18:56:49 -0400 Subject: [PATCH] Fix: accept traces which skip stream ids Signed-off-by: Mathieu Desnoyers --- formats/ctf/ctf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index e3a487d6..5dce5f5a 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -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; -- 2.34.1