Merge pull request #498 from alexbakker/slot-null

Allow changing the password if no password slot is present
This commit is contained in:
Michael Schättgen 2020-07-04 12:05:26 +02:00 committed by GitHub
commit 94ebc08097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -822,7 +822,9 @@ public class PreferencesFragment extends PreferenceFragmentCompat {
// remove the old master password slot
PasswordSlot oldSlot = creds.getSlots().find(PasswordSlot.class);
slots.remove(oldSlot);
if (oldSlot != null) {
slots.remove(oldSlot);
}
// add the new master password slot
slots.add(slot);