Add missing NULL pointer check
[babeltrace.git] / formats / ctf / metadata / ctf-visitor-generate-io-struct.c
index 9bcc170670b3fd1d930996127874c482f26ae061..10b59f10558202c99e72fd6e9184586ab4b76a10 100644 (file)
@@ -1164,6 +1164,8 @@ struct bt_declaration *ctf_declaration_type_specifier_visit(FILE *fd, int depth,
        id_q = g_quark_from_string(str_c);
        g_free(str_c);
        declaration = bt_lookup_declaration(id_q, declaration_scope);
+       if (!declaration)
+               return NULL;
        bt_declaration_ref(declaration);
        return declaration;
 }
@@ -2868,7 +2870,7 @@ int ctf_visitor_construct_metadata(FILE *fd, int depth, struct ctf_node *node,
        struct ctf_node *iter;
        int env_clock_done = 0;
 
-       printf_verbose("CTF visitor: metadata construction... ");
+       printf_verbose("CTF visitor: metadata construction...\n");
        trace->byte_order = byte_order;
        trace->clocks = g_hash_table_new_full(g_direct_hash, g_direct_equal,
                                NULL, clock_free);
This page took 0.043249 seconds and 4 git commands to generate.