X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fctf-ir%2Fstream-class.c;h=0463a119e591f620f0fae02be0b9c7bde294f6c8;hb=5acf2ae6bdfb2bc6fa88e250a87ccc6ba3546d89;hp=4fac746800a0646508cc3d14af2044d2c71be3a4;hpb=c1e730febb17c72e96c356d54b8df31d5c0c0b94;p=babeltrace.git diff --git a/lib/ctf-ir/stream-class.c b/lib/ctf-ir/stream-class.c index 4fac7468..0463a119 100644 --- a/lib/ctf-ir/stream-class.c +++ b/lib/ctf-ir/stream-class.c @@ -336,6 +336,12 @@ int bt_ctf_stream_class_add_event_class( goto end; } + trace = bt_ctf_stream_class_get_trace(stream_class); + if (trace && trace->is_static) { + ret = -1; + goto end; + } + event_id = g_new(int64_t, 1); if (!event_id) { ret = -1; @@ -358,7 +364,6 @@ int bt_ctf_stream_class_add_event_class( goto end; } - trace = bt_ctf_stream_class_get_trace(stream_class); if (trace) { /* * If the stream class is associated with a trace, then