X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=sprinter-json.c;h=0a077907cd83368c339c320968ef2b8a5e91f7d8;hp=c9b683530b08cb97d0d4689efe7d0a3fff1b5e84;hb=94c3b40d41f1ad98719d411ef28b69075fda0579;hpb=36e640852b240ad10daed626391e1b812df89200 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)); }