Browse Source

Fixed crash.

grunfink 1 year ago
parent
commit
5d680a5ba2
1 changed files with 5 additions and 4 deletions
  1. 5 4
      html.c

+ 5 - 4
html.c

@@ -3495,10 +3495,11 @@ xs_str *html_notifications(snac *user, int skip, int show)
             html_label);
             html_label);
 
 
         if (strcmp(type, "Follow") == 0 || strcmp(utype, "Follow") == 0 || strcmp(type, "Block") == 0) {
         if (strcmp(type, "Follow") == 0 || strcmp(utype, "Follow") == 0 || strcmp(type, "Block") == 0) {
-            xs_html_add(entry,
-                xs_html_tag("div",
-                    xs_html_attr("class", "snac-post"),
-                    html_actor_icon(user, actor, NULL, NULL, NULL, 0, 0, proxy, NULL, NULL)));
+            if (actor)
+                xs_html_add(entry,
+                    xs_html_tag("div",
+                        xs_html_attr("class", "snac-post"),
+                        html_actor_icon(user, actor, NULL, NULL, NULL, 0, 0, proxy, NULL, NULL)));
         }
         }
         else
         else
         if (strcmp(type, "Move") == 0) {
         if (strcmp(type, "Move") == 0) {