CTF AST: tmp_head list fixes
[babeltrace.git] / formats / ctf / metadata / ctf-visitor-xml.c
index 22829d9b47401ab1132cfcf0465fb113267bdce4..96d4ec5fc2fa15a347fbc689abb5fc54df190515 100644 (file)
@@ -192,10 +192,12 @@ int ctf_visitor_print_type_declarator(FILE *fd, int depth, struct ctf_node *node
 
        switch (node->u.type_declarator.type) {
        case TYPEDEC_ID:
-               print_tabs(fd, depth);
-               fprintf(fd, "<id \"");
-               fprintf(fd, "%s", node->u.type_declarator.u.id);
-               fprintf(fd, "\" />\n");
+               if (node->u.type_declarator.u.id) {
+                       print_tabs(fd, depth);
+                       fprintf(fd, "<id \"");
+                       fprintf(fd, "%s", node->u.type_declarator.u.id);
+                       fprintf(fd, "\" />\n");
+               }
                break;
        case TYPEDEC_NESTED:
                if (node->u.type_declarator.u.nested.type_declarator) {
This page took 0.022828 seconds and 4 git commands to generate.