summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-04-26 17:37:33 +0200
committerdefault <nobody@localhost>2023-04-26 17:37:33 +0200
commit9bb08cfd51f670acd25c445abd1e7fd759da86e1 (patch)
treeed54fd6337c7945591cebb63f7ece3e33952a674 /mastoapi.c
parente2ef581e842880fb6673d22fb26d2dd329282736 (diff)
Fixed crash in mastoapi search.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 3b388a4..d7bc8c1 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1436,7 +1436,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
/* reply something only for offset 0; otherwise,
apps like Tusky keep asking again and again */
- if (!xs_is_null(q) && strcmp(type, "accounts") == 0) {
+ if (!xs_is_null(q) && !xs_is_null(type) && strcmp(type, "accounts") == 0) {
/* do a webfinger query */
char *actor = NULL;
char *user = NULL;