X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Flib%2Fgraph%2Fmessage%2Fpacket.c;h=b00f2dfc0b7026c540affb5787f21d7c79377387;hp=63471f6040c1e17fc62c634db45048fa1ced2d69;hb=26fc5aedf;hpb=bfb5625df591dcd384f50af3a93c5904ea6b7fcd diff --git a/src/lib/graph/message/packet.c b/src/lib/graph/message/packet.c index 63471f60..b00f2dfc 100644 --- a/src/lib/graph/message/packet.c +++ b/src/lib/graph/message/packet.c @@ -99,6 +99,12 @@ struct bt_message *create_packet_message( stream_class = bt_stream_borrow_class(stream); BT_ASSERT(stream_class); + /* + * It's not possible to create a packet from a stream of which + * the class indicates that packets are not supported. + */ + BT_ASSERT(stream_class->supports_packets); + if (pool == &msg_iter->graph->packet_begin_msg_pool) { need_cs = stream_class->packets_have_beginning_default_clock_snapshot; } else {