Fix some potential crashes

This commit is contained in:
tom79 2019-08-24 21:05:45 +02:00
parent 8c218f1dd5
commit 0558261e4c
1 changed files with 1 additions and 1 deletions

View File

@ -899,7 +899,7 @@ public class API {
}
String response = new HttpsConnection(context, this.instance).get(getAbsoluteUrl("/accounts/verify_credentials"), 10, null, prefKeyOauthTokenT);
account = parseAccountResponse(context, new JSONObject(response));
if( account != null && account.getSocial().equals("PLEROMA")){
if( account != null && account.getSocial() != null && account.getSocial().equals("PLEROMA")){
isPleromaAdmin(account.getAcct());
}
} catch (HttpsConnection.HttpsConnectionException e) {