X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=sprinter-json.c;h=0a077907cd83368c339c320968ef2b8a5e91f7d8;hp=c9b683530b08cb97d0d4689efe7d0a3fff1b5e84;hb=4e2c351c588ad74f4800ca0344232be90387c54a;hpb=14883b07003b9ed4223cd8f2c03b301fddae07bd diff --git a/sprinter-json.c b/sprinter-json.c index c9b68353..0a077907 100644 --- a/sprinter-json.c +++ b/sprinter-json.c @@ -118,6 +118,8 @@ json_string_len (struct sprinter *sp, const char *val, size_t len) static void json_string (struct sprinter *sp, const char *val) { + if (val == NULL) + val = ""; json_string_len (sp, val, strlen (val)); }