ctf: avoid using computing offset from nullptr pointer
When running the test_trace_collection_message_iterator.py test in a
build with -fsanitize=undefined, I see:
/home/simark/src/babeltrace/src/plugins/ctf/common/metadata/visitor-generate-ir.cpp:1143:30: runtime error: member access within null pointer of type 'struct ctf_node'
This happens when `node_field_class_declarator` is nullptr. Avoid this
by using `node_field_class_declarator` once we know it's non-nullptr.
Change-Id: I585e5b17af7e1a16a217ef46c0a49fae901dcae8
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/9513
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.026919 seconds and 4 git commands to generate.