summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar byte2026-01-17 02:49:56 +0000
committerGravatar byte2026-01-17 02:49:56 +0000
commit84c0ee63cf4a67e7fb8484ef874b121160b63382 (patch)
tree3de92286d5b2f4ae42ac6ba595950688e2e71484
parentVersion 2.88 RELEASED. (diff)
downloadsnac2-84c0ee63cf4a67e7fb8484ef874b121160b63382.tar.gz
snac2-84c0ee63cf4a67e7fb8484ef874b121160b63382.tar.xz
snac2-84c0ee63cf4a67e7fb8484ef874b121160b63382.zip
segfault fix
-rw-r--r--html.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/html.c b/html.c
index a11b448..b4cb1c7 100644
--- a/html.c
+++ b/html.c
@@ -167,6 +167,7 @@ xs_str *actor_pronouns(xs_dict *actor)
167{ 167{
168 const xs_list *attachment; 168 const xs_list *attachment;
169 const xs_dict *d; 169 const xs_dict *d;
170 const char *v;
170 const char *pronouns = ""; 171 const char *pronouns = "";
171 xs_str *ret; 172 xs_str *ret;
172 173
@@ -175,7 +176,9 @@ xs_str *actor_pronouns(xs_dict *actor)
175 xs *prop = xs_utf8_to_lower(xs_dict_get(d, "name")); 176 xs *prop = xs_utf8_to_lower(xs_dict_get(d, "name"));
176 /* make sure that we are reading the correct metadata */ 177 /* make sure that we are reading the correct metadata */
177 if (strlen(prop) == 8 && strcmp(prop, "pronouns") == 0) { 178 if (strlen(prop) == 8 && strcmp(prop, "pronouns") == 0) {
178 pronouns = xs_dict_get(d, "value"); 179 /* safeguard from NULL values */
180 v = xs_dict_get(d, "value");
181 pronouns = v ? v : pronouns;
179 break; 182 break;
180 } 183 }
181 } 184 }