mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-31 20:25:38 +00:00
Prevent crash
This commit is contained in:
parent
c73f4289af
commit
73ecf877d6
1 changed files with 2 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue