lib: make packets and packet messages optional, disabled by default
[babeltrace.git] / src / lib / trace-ir / packet-context-field.c
index 388c20f307cc83ec01c19c0f224c9f2ada610792..9f648e24a221404caa37ed9dc70b745063841a70 100644 (file)
@@ -63,6 +63,9 @@ struct bt_packet_context_field *bt_packet_context_field_create(
        struct bt_field_wrapper *field_wrapper;
 
        BT_ASSERT_PRE_NON_NULL(stream_class, "Stream class");
+       BT_ASSERT_PRE(stream_class->supports_packets,
+               "Stream class does not support packets: %![sc-]+S",
+               stream_class);
        BT_ASSERT_PRE(stream_class->packet_context_fc,
                "Stream class has no packet context field class: %!+S",
                stream_class);
This page took 0.023783 seconds and 4 git commands to generate.