Fix: the fields to reset are optional
authorJulien Desfossez <jdesfossez@efficios.com>
Tue, 13 Jun 2017 18:01:25 +0000 (14:01 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Jun 2017 20:07:07 +0000 (16:07 -0400)
This is a not a fatal error, just ignore if the fields are not there.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/ctf-ir/stream.c

index cf30d09d964037749b52828cdf24b1ac17b8b558..16286501d78b35ac80131b4abc247766cc032742 100644 (file)
@@ -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)
This page took 0.024857 seconds and 4 git commands to generate.