1
0
mirror of https://github.com/etesync/android synced 2024-12-23 07:08:16 +00:00

AccountActivity: fix crash when removing account.

This commit is contained in:
Tom Hacohen 2020-09-03 09:13:48 +03:00
parent 2417f77a39
commit f6a44a33da

View File

@ -407,7 +407,12 @@ class AccountActivity : BaseActivity(), Toolbar.OnMenuItemClickListener, PopupMe
override fun loadInBackground(): AccountInfo {
val info = AccountInfo()
val settings = AccountSettings(context, account)
val settings: AccountSettings
try {
settings = AccountSettings(context, account)
} catch (e: InvalidAccountException) {
return info
}
if (settings.isLegacy) {
val data = (context.applicationContext as App).data