mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 19:35:10 +01:00
Prevent crash
This commit is contained in:
@@ -105,6 +105,8 @@ public class GmailState {
|
||||
|
||||
static Account getAccount(Context context, String user) {
|
||||
AccountManager am = AccountManager.get(context);
|
||||
if (am == null)
|
||||
return null;
|
||||
Account[] accounts = am.getAccountsByType(TYPE_GOOGLE);
|
||||
for (Account account : accounts)
|
||||
if (Objects.equals(account.name, user))
|
||||
|
||||
Reference in New Issue
Block a user