diff options
| author | 2026-01-17 02:49:56 +0000 | |
|---|---|---|
| committer | 2026-01-17 02:49:56 +0000 | |
| commit | 84c0ee63cf4a67e7fb8484ef874b121160b63382 (patch) | |
| tree | 3de92286d5b2f4ae42ac6ba595950688e2e71484 | |
| parent | Version 2.88 RELEASED. (diff) | |
| download | snac2-84c0ee63cf4a67e7fb8484ef874b121160b63382.tar.gz snac2-84c0ee63cf4a67e7fb8484ef874b121160b63382.tar.xz snac2-84c0ee63cf4a67e7fb8484ef874b121160b63382.zip | |
segfault fix
| -rw-r--r-- | html.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -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 | } |