aboutsummaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorgreen <dandelions@disroot.org>2025-04-13 21:23:01 +0200
committergreen <dandelions@disroot.org>2026-01-24 02:23:16 +0100
commit207d9e0f01b1703ed55b00825ef65be49576254b (patch)
tree34d35c5b740579d26097827f9dbc7b70c483e1ca /html.c
parent50129db64b70604d347c2f21be5e5182080c6e07 (diff)
small: fix segfault for poll options
Diffstat (limited to 'html.c')
-rw-r--r--html.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/html.c b/html.c
index 1a7162f..9de51d1 100644
--- a/html.c
+++ b/html.c
@@ -780,7 +780,8 @@ xs_html *html_note(snac *user, const char *summary,
if (poll) {
const xs_number *max_options = xs_dict_get(srv_config, "max_poll_options");
xs *poll_limit_str = xs_dup(L("Poll options (one per line, up to 8):"));
- poll_limit_str = xs_replace_i(poll_limit_str, "8", xs_number_str(max_options));
+ if (max_options != NULL)
+ poll_limit_str = xs_replace_i(poll_limit_str, "8", xs_number_str(max_options));
xs_html_add(form,
xs_html_tag("p", NULL),