mirror of
https://github.com/beemdevelopment/Aegis
synced 2024-10-01 13:33:37 +00:00
Don't initialize VaultManager after the intro unless saving succeeds
In rare cases where writing to disk fails after the intro, a crash could occur if the user presses "Done" again. VaultManager would have been initialized, and trying to initialize it again would result in a crash.
This commit is contained in:
parent
2d0e201060
commit
8bbbe3611a
|
@ -55,8 +55,9 @@ public class VaultManager {
|
|||
throw new IllegalStateException("Vault manager is already initialized");
|
||||
}
|
||||
|
||||
_repo = new VaultRepository(_context, new Vault(), creds);
|
||||
save();
|
||||
VaultRepository repo = new VaultRepository(_context, new Vault(), creds);
|
||||
repo.save();
|
||||
_repo = repo;
|
||||
|
||||
if (getVault().isEncryptionEnabled()) {
|
||||
startNotificationService();
|
||||
|
|
Loading…
Reference in a new issue