瀏覽代碼

mastoapi: check the url before checking.

default 2 年之前
父節點
當前提交
33e410301b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mastoapi.c

+ 1 - 1
mastoapi.c

@@ -649,7 +649,7 @@ xs_dict *mastoapi_account(const xs_dict *actor)
 
 
             char *url = xs_dict_get(metadata, name);
             char *url = xs_dict_get(metadata, name);
 
 
-            if (xs_startswith(url, "https:/" "/")) {
+            if (!xs_is_null(url) && xs_startswith(url, "https:/" "/")) {
                 xs_number *verified_time = xs_dict_get(val_links, url);
                 xs_number *verified_time = xs_dict_get(val_links, url);
                 if (xs_type(verified_time) == XSTYPE_NUMBER) {
                 if (xs_type(verified_time) == XSTYPE_NUMBER) {
                     time_t t = xs_number_get(verified_time);
                     time_t t = xs_number_get(verified_time);