summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-06-12 19:39:15 +0200
committerGravatar default2023-06-12 19:39:15 +0200
commit3977a12bef880e622c1411a77f74c78d241dd072 (patch)
treefa368c48b0bb81c13f5e5fc0c6ff4b5134771f88
parentMerge pull request 'add mastodon profile header to mastodon api' (#46) from H... (diff)
downloadsnac2-3977a12bef880e622c1411a77f74c78d241dd072.tar.gz
snac2-3977a12bef880e622c1411a77f74c78d241dd072.tar.xz
snac2-3977a12bef880e622c1411a77f74c78d241dd072.zip
Avoid writing a NULL header in mastoapi_account().
-rw-r--r--mastoapi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 661b8dd..db898e9 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -548,6 +548,9 @@ xs_dict *mastoapi_account(const xs_dict *actor)
548 if (xs_type(hd) == XSTYPE_DICT) 548 if (xs_type(hd) == XSTYPE_DICT)
549 header = xs_dup(xs_dict_get(hd, "url")); 549 header = xs_dup(xs_dict_get(hd, "url"));
550 550
551 if (xs_is_null(header))
552 header = xs_dup("");
553
551 acct = xs_dict_append(acct, "header", header); 554 acct = xs_dict_append(acct, "header", header);
552 acct = xs_dict_append(acct, "header_static", header); 555 acct = xs_dict_append(acct, "header_static", header);
553 556