From db1af8cc0a6f6608d6779d32721530f1403e80cb Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Tue, 13 Jun 2017 14:01:25 -0400 Subject: [PATCH] Fix: the fields to reset are optional MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This is a not a fatal error, just ignore if the fields are not there. Signed-off-by: Julien Desfossez Signed-off-by: Jérémie Galarneau --- lib/ctf-ir/stream.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/ctf-ir/stream.c b/lib/ctf-ir/stream.c index cf30d09d..16286501 100644 --- a/lib/ctf-ir/stream.c +++ b/lib/ctf-ir/stream.c @@ -1451,9 +1451,10 @@ void reset_structure_field(struct bt_ctf_field *structure, const char *name) struct bt_ctf_field *member; member = bt_ctf_field_structure_get_field(structure, name); - assert(member); - (void) bt_ctf_field_reset(member); - bt_put(member); + if (member) { + (void) bt_ctf_field_reset(member); + bt_put(member); + } } int bt_ctf_stream_flush(struct bt_ctf_stream *stream) -- 2.34.1