From: Julien Desfossez Date: Tue, 13 Jun 2017 18:01:25 +0000 (-0400) Subject: Fix: the fields to reset are optional X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=db1af8cc0a6f6608d6779d32721530f1403e80cb Fix: the fields to reset are optional 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 --- 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)