commit 0e86119
default
·
2022-12-04 11:04:37 +0000 UTC
parent 926e903
Fixed crash in new code (moron me...)
1 files changed,
+5,
-1
M
html.c
M
html.c
+5,
-1
1@@ -302,6 +302,10 @@ d_char *html_top_controls(snac *snac, d_char *s)
2 if (xs_is_null(email))
3 email = "";
4
5+ char *cw = xs_dict_get(snac->config, "cw");
6+ if (xs_is_null(cw))
7+ cw = "";
8+
9 xs *s1 = xs_fmt(_tmpl,
10 snac->actor,
11 L("Sensitive content"),
12@@ -323,7 +327,7 @@ d_char *html_top_controls(snac *snac, d_char *s)
13 xs_dict_get(snac->config, "avatar"),
14 L("Bio"),
15 xs_dict_get(snac->config, "bio"),
16- strcmp(xs_dict_get(snac->config, "cw"), "open") == 0 ? "checked" : "",
17+ strcmp(cw, "open") == 0 ? "checked" : "",
18 L("Always show sensitive content"),
19 L("Email address for notifications"),
20 email,