mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-06 17:25:05 -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,10 +515,14 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
||||
|
||||
public boolean hasPassphraseChanged()
|
||||
{
|
||||
if (mNoPassphrase.isChecked()) {
|
||||
return mIsPassPhraseSet;
|
||||
} else {
|
||||
return (mNewPassPhrase != null && !mNewPassPhrase.equals(""));
|
||||
if (mNoPassphrase != null) {
|
||||
if (mNoPassphrase.isChecked()) {
|
||||
return mIsPassPhraseSet;
|
||||
} else {
|
||||
return (mNewPassPhrase != null && !mNewPassPhrase.equals(""));
|
||||
}
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user