Просмотр исходного кода

mastoapi: added more checks in the notifications code.

default 1 год назад
Родитель
Сommit
442b46abc0
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      mastoapi.c

+ 4 - 0
mastoapi.c

@@ -1784,6 +1784,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
                 mn = xs_dict_append(mn, "created_at", xs_dict_get(noti, "date"));
 
                 xs *acct = mastoapi_account(&snac1, actor);
+
+                if (acct == NULL)
+                    continue;
+
                 mn = xs_dict_append(mn, "account", acct);
 
                 if (strcmp(type, "follow") != 0 && !xs_is_null(objid)) {