Add missing NULL pointer check
[babeltrace.git] / formats / ctf / metadata / ctf-visitor-generate-io-struct.c
index a18f762c9b189b53aee0e58035e192499ea29957..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;
 }
This page took 0.022936 seconds and 4 git commands to generate.