Add Trace CTF IR type
[babeltrace.git] / formats / ctf / ir / stream.c
index d9bd5ef87b0950ef0fb60b63a189196ab7d2b33c..57b893790ae36ca2a8e2122b72f083111ad31adf 100644 (file)
@@ -326,7 +326,11 @@ int bt_ctf_stream_flush(struct bt_ctf_stream *stream)
        struct bt_ctf_field *integer = NULL;
        struct ctf_stream_pos packet_context_pos;
 
-       if (!stream) {
+       if (!stream || stream->pos.fd < 0) {
+               /*
+                * Stream does not have an associated fd. It is,
+                * therefore, not a stream being used to write events.
+                */
                ret = -1;
                goto end;
        }
This page took 0.025237 seconds and 4 git commands to generate.