Sequence: add missing handling of integer encoding
[babeltrace.git] / formats / ctf-text / types / integer.c
index 1337eca3ab13df44bb89e7ee5903d381dd743a88..457ea804e5133ca1e32488e857b2ad6b0369da9e 100644 (file)
@@ -40,8 +40,9 @@ int ctf_text_integer_write(struct stream_pos *ppos, struct definition *definitio
                fprintf(pos->fp, "%s = ",
                        g_quark_to_string(definition->name));
 
-       if (integer_declaration->encoding == CTF_STRING_ASCII
-           || integer_declaration->encoding == CTF_STRING_UTF8) {
+       if (pos->string
+           && (integer_declaration->encoding == CTF_STRING_ASCII
+             || integer_declaration->encoding == CTF_STRING_UTF8)) {
 
                if (!integer_declaration->signedness) {
                        g_string_append_c(pos->string,
This page took 0.023777 seconds and 4 git commands to generate.