X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=json.c;fp=json.c;h=3fd923ca787cf62ba3ea4788d976212beb981dba;hp=1d0c169449657c49970390ebf76cf98ce11be2e8;hb=cacefbf3d6dd5bce0b60b3cdfce29bfa371dfaea;hpb=cdd64727f197bf9e24b89da768d75bf268b8fb1c;ds=sidebyside diff --git a/json.c b/json.c index 1d0c1694..3fd923ca 100644 --- a/json.c +++ b/json.c @@ -105,5 +105,8 @@ json_quote_chararray(const void *ctx, const char *str, const size_t len) char * json_quote_str(const void *ctx, const char *str) { + if (str == NULL) + str = ""; + return (json_quote_chararray (ctx, str, strlen (str))); }