fix create keyring crash

This commit is contained in:
Ashley Hughes 2014-02-08 15:51:11 +00:00
parent b74ed46434
commit 44ee713763

View File

@ -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() {