瀏覽代碼

Avoid writing a NULL header in mastoapi_account().

default 3 年之前
父節點
當前提交
3977a12bef
共有 1 個文件被更改,包括 3 次插入 和 0 次删除
  1. 3 0
      mastoapi.c

+ 3 - 0
mastoapi.c

@@ -548,6 +548,9 @@ xs_dict *mastoapi_account(const xs_dict *actor)
     if (xs_type(hd) == XSTYPE_DICT)
         header = xs_dup(xs_dict_get(hd, "url"));
 
+    if (xs_is_null(header))
+        header = xs_dup("");
+
     acct = xs_dict_append(acct, "header", header);
     acct = xs_dict_append(acct, "header_static", header);