Browse Source

Fixed crash in the notification area after deleting a post.

default 2 months ago
parent
commit
5d267968cb
1 changed files with 3 additions and 1 deletions
  1. 3 1
      html.c

+ 3 - 1
html.c

@@ -3074,7 +3074,9 @@ xs_str *html_notifications(snac *user, int skip, int show)
 
         /* store in the admiration labels dict */
         xs *pl = xs_data_new(&html_label, sizeof(html_label));
-        admiration_labels = xs_dict_set(admiration_labels, msg_id, pl);
+
+        if (xs_is_string(msg_id))
+            admiration_labels = xs_dict_set(admiration_labels, msg_id, pl);
 
         entry = xs_html_tag("div",
             xs_html_attr("class", "snac-post-with-desc"),