Fix error when no account when updating credentials

This commit is contained in:
tom79 2019-09-29 11:03:52 +02:00
parent 8a0e08aeb2
commit f574982c63
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ public class UpdateAccountInfoAsyncTask extends AsyncTask<Void, Void, Void> {
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();