/*
* stream.c
*
- * Babeltrace CTF Writer
+ * Babeltrace CTF IR - Stream
*
* Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
*
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;
}