From f574982c633a7cb5a2f98f376028c85e59106777 Mon Sep 17 00:00:00 2001 From: tom79 Date: Sun, 29 Sep 2019 11:03:52 +0200 Subject: [PATCH] Fix error when no account when updating credentials --- .../fedilab/android/asynctasks/UpdateAccountInfoAsyncTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/android/asynctasks/UpdateAccountInfoAsyncTask.java b/app/src/main/java/app/fedilab/android/asynctasks/UpdateAccountInfoAsyncTask.java index ab0257576..9c7e245b1 100644 --- a/app/src/main/java/app/fedilab/android/asynctasks/UpdateAccountInfoAsyncTask.java +++ b/app/src/main/java/app/fedilab/android/asynctasks/UpdateAccountInfoAsyncTask.java @@ -72,7 +72,7 @@ public class UpdateAccountInfoAsyncTask extends AsyncTask { if (social == SOCIAL.MASTODON || social == SOCIAL.PIXELFED) { account = new API(this.contextReference.get(), instance, null).verifyCredentials(); InstanceNodeInfo info = new API(this.contextReference.get(), instance, null).getRealNodeInfo(this.instance); - if (info != null) + if (info != null && info.getName() != null && account != null) account.setSocial(info.getName().toUpperCase()); } else if (social == SOCIAL.PEERTUBE) { account = new PeertubeAPI(this.contextReference.get(), instance, null).verifyCredentials();