summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-08-12 18:42:11 +0200
committerdefault <nobody@localhost>2023-08-12 18:42:11 +0200
commitee31fa4bae9a182943af1877e3718531d78286c8 (patch)
treea13f7a86643e02be72eb43437ba7bcd80cd0551f
parentd48819ded880b5d9917f5e01414a5983ce6d5d16 (diff)
Fixed crash.
-rw-r--r--mastoapi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 7e0c781..2acef04 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1463,10 +1463,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
ins = xs_dict_append(ins, "urls", d1);
xs *z = xs_number_new(0);
- d1 = xs_dict_append(d1, "user_count", z);
- d1 = xs_dict_append(d1, "status_count", z);
- d1 = xs_dict_append(d1, "domain_count", z);
- ins = xs_dict_append(ins, "stats", d1);
+ xs *d2 = xs_dict_append(xs_dict_new(), "user_count", z);
+ d2 = xs_dict_append(d2, "status_count", z);
+ d2 = xs_dict_append(d2, "domain_count", z);
+ ins = xs_dict_append(ins, "stats", d2);
ins = xs_dict_append(ins, "registrations", xs_stock_false);
ins = xs_dict_append(ins, "approval_required", xs_stock_false);