summaryrefslogtreecommitdiff
path: root/webfinger.c
diff options
context:
space:
mode:
Diffstat (limited to 'webfinger.c')
-rw-r--r--webfinger.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/webfinger.c b/webfinger.c
index aeaf754..4d449b4 100644
--- a/webfinger.c
+++ b/webfinger.c
@@ -73,7 +73,10 @@ void webfinger_request(char *qs, int *status, char **actor, char **user)
xs *obj = xs_json_loads(payload);
if (user != NULL) {
- *user = xs_replace(xs_dict_get(obj, "subject"), "acct:", "");
+ char *subject = xs_dict_get(obj, "subject");
+
+ if (subject)
+ *user = xs_replace(subject, "acct:", "");
}
if (actor != NULL) {