commit a0fc1b38eb3a343b06217ff0b2d73f4e8ec86bb7
parent 220f611eac77c720c58786e7b945980602423dcc
Author: default <nobody@localhost>
Date: Mon, 28 Oct 2024 09:37:02 +0100
Fixed crash.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/html.c b/html.c
@@ -1944,7 +1944,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
const char *name = xs_dict_get(a, "name");
/* if this image is already in the post content, skip */
- if (xs_str_in(content, href) != -1)
+ if (content && xs_str_in(content, href) != -1)
continue;
if (xs_startswith(type, "image/") || strcmp(type, "Image") == 0) {