mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-17 15:32:52 +00:00
Fix a NullPointerException in the intro
This commit is contained in:
parent
972a1670eb
commit
be222cd877
1 changed files with 3 additions and 1 deletions
|
@ -146,7 +146,7 @@ public class IntroActivity extends AppIntro implements DerivationTask.Callback {
|
||||||
masterKey = MasterKey.generate();
|
masterKey = MasterKey.generate();
|
||||||
}
|
}
|
||||||
|
|
||||||
SlotCollection slots = _databaseFile.getSlots();
|
SlotCollection slots = null;
|
||||||
if (cryptType != CustomAuthenticationSlide.CRYPT_TYPE_NONE) {
|
if (cryptType != CustomAuthenticationSlide.CRYPT_TYPE_NONE) {
|
||||||
// encrypt the master key with a key derived from the user's password
|
// encrypt the master key with a key derived from the user's password
|
||||||
// and add it to the list of slots
|
// and add it to the list of slots
|
||||||
|
@ -154,8 +154,10 @@ public class IntroActivity extends AppIntro implements DerivationTask.Callback {
|
||||||
throw new RuntimeException();
|
throw new RuntimeException();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
slots = new SlotCollection();
|
||||||
slots.encrypt(_passwordSlot, masterKey, _passwordCipher);
|
slots.encrypt(_passwordSlot, masterKey, _passwordCipher);
|
||||||
slots.add(_passwordSlot);
|
slots.add(_passwordSlot);
|
||||||
|
_databaseFile.setSlots(slots);
|
||||||
} catch (SlotException e) {
|
} catch (SlotException e) {
|
||||||
setException(e);
|
setException(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue