Prevent crash

This commit is contained in:
M66B
2022-01-13 13:56:03 +01:00
parent c73f4289af
commit 73ecf877d6

View File

@@ -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))