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()
|
public boolean needsSaving()
|
||||||
{
|
{
|
||||||
mNeedsSaving = mUserIdsView.needsSaving();
|
mNeedsSaving = (mUserIdsView == null) ? false : mUserIdsView.needsSaving();
|
||||||
mNeedsSaving |= mKeysView.needsSaving();
|
mNeedsSaving |= (mKeysView == null) ? false : mKeysView.needsSaving();
|
||||||
mNeedsSaving |= hasPassphraseChanged();
|
mNeedsSaving |= hasPassphraseChanged();
|
||||||
return mNeedsSaving;
|
return mNeedsSaving;
|
||||||
}
|
}
|
||||||
@ -515,10 +515,14 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
|||||||
|
|
||||||
public boolean hasPassphraseChanged()
|
public boolean hasPassphraseChanged()
|
||||||
{
|
{
|
||||||
if (mNoPassphrase.isChecked()) {
|
if (mNoPassphrase != null) {
|
||||||
return mIsPassPhraseSet;
|
if (mNoPassphrase.isChecked()) {
|
||||||
} else {
|
return mIsPassPhraseSet;
|
||||||
return (mNewPassPhrase != null && !mNewPassPhrase.equals(""));
|
} else {
|
||||||
|
return (mNewPassPhrase != null && !mNewPassPhrase.equals(""));
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user