Throw error when account acct is null - I currently don't understand when it happens...

This commit is contained in:
stom79 2018-09-02 11:21:37 +02:00
parent 16dd11b92c
commit 2c5b8d48a9
1 changed files with 6 additions and 0 deletions

View File

@ -739,6 +739,12 @@ public class API {
apiResponse.setSince_id(httpsConnection.getSince_id());
apiResponse.setMax_id(httpsConnection.getMax_id());
accounts = parseAccountResponse(new JSONArray(response));
if( accounts != null && accounts.size() == 1 ){
if(accounts.get(0).getAcct() == null){
Throwable error = new Throwable(context.getString(R.string.toast_error));
setError(500, error);
}
}
} catch (HttpsConnection.HttpsConnectionException e) {
setError(e.getStatusCode(), e);
} catch (NoSuchAlgorithmException e) {