Fixed config account crash

This commit is contained in:
M66B 2021-12-27 18:58:33 +01:00
parent 2683709643
commit 5250286a02
1 changed files with 4 additions and 2 deletions

View File

@ -720,7 +720,8 @@ public class FragmentAccount extends FragmentBase {
result.account = db.account().getAccount(id);
result.folders = new ArrayList<>();
if (result.account.auth_type != AUTH_TYPE_PASSWORD &&
if (result.account != null &&
result.account.auth_type != AUTH_TYPE_PASSWORD &&
!Objects.equals(result.account.password, password))
auth = AUTH_TYPE_PASSWORD;
@ -988,7 +989,8 @@ public class FragmentAccount extends FragmentBase {
DB db = DB.getInstance(context);
EntityAccount account = db.account().getAccount(id);
if (account.auth_type != AUTH_TYPE_PASSWORD &&
if (account != null &&
account.auth_type != AUTH_TYPE_PASSWORD &&
!Objects.equals(account.password, password))
auth = AUTH_TYPE_PASSWORD;