More crash fixes

This commit is contained in:
Grishka
2022-04-29 03:37:18 +03:00
parent 4e4b5fcfe4
commit 93fbc52f6a
4 changed files with 11 additions and 6 deletions

View File

@@ -75,9 +75,14 @@ public abstract class MastodonAPIRequest<T> extends APIRequest<T>{
}
public MastodonAPIRequest<T> exec(String accountID){
account=AccountSessionManager.getInstance().getAccount(accountID);
domain=account.domain;
account.getApiController().submitRequest(this);
try{
account=AccountSessionManager.getInstance().getAccount(accountID);
domain=account.domain;
account.getApiController().submitRequest(this);
}catch(Exception x){
Log.e(TAG, "exec: this shouldn't happen, but it still did", x);
invokeErrorCallback(new MastodonErrorResponse(x.getLocalizedMessage(), -1));
}
return this;
}