mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-11 11:35:07 -05:00
fix create keyring crash
This commit is contained in:
parent
b74ed46434
commit
44ee713763
@ -115,8 +115,8 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
||||
|
||||
public boolean needsSaving()
|
||||
{
|
||||
mNeedsSaving = mUserIdsView.needsSaving();
|
||||
mNeedsSaving |= mKeysView.needsSaving();
|
||||
mNeedsSaving = (mUserIdsView == null) ? false : mUserIdsView.needsSaving();
|
||||
mNeedsSaving |= (mKeysView == null) ? false : mKeysView.needsSaving();
|
||||
mNeedsSaving |= hasPassphraseChanged();
|
||||
return mNeedsSaving;
|
||||
}
|
||||
@ -515,11 +515,15 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
||||
|
||||
public boolean hasPassphraseChanged()
|
||||
{
|
||||
if (mNoPassphrase != null) {
|
||||
if (mNoPassphrase.isChecked()) {
|
||||
return mIsPassPhraseSet;
|
||||
} else {
|
||||
return (mNewPassPhrase != null && !mNewPassPhrase.equals(""));
|
||||
}
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void saveClicked() {
|
||||
|
Loading…
Reference in New Issue
Block a user