mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Fix for another NPE which should never happen but apparently does.
This commit is contained in:
parent
b4e48f9dba
commit
faa3d2276e
@ -16,18 +16,19 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.InvalidPassphraseException;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecretUtil;
|
||||
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.InvalidPassphraseException;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||
import org.thoughtcrime.securesms.crypto.MasterSecretUtil;
|
||||
import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
|
||||
/**
|
||||
* Activity for changing a user's local encryption passphrase.
|
||||
*
|
||||
@ -63,9 +64,13 @@ public class PassphraseChangeActivity extends PassphraseActivity {
|
||||
}
|
||||
|
||||
private void verifyAndSavePassphrases() {
|
||||
String original = this.originalPassphrase.getText().toString();
|
||||
String passphrase = this.newPassphrase.getText().toString();
|
||||
String passphraseRepeat = this.repeatPassphrase.getText().toString();
|
||||
Editable originalText = this.originalPassphrase.getText();
|
||||
Editable newText = this.newPassphrase.getText();
|
||||
Editable repeatText = this.repeatPassphrase.getText();
|
||||
|
||||
String original = (originalText == null ? "" : originalText.toString());
|
||||
String passphrase = (newText == null ? "" : newText.toString());
|
||||
String passphraseRepeat = (repeatText == null ? "" : repeatText.toString());
|
||||
|
||||
try {
|
||||
if (!passphrase.equals(passphraseRepeat)) {
|
||||
|
Loading…
Reference in New Issue
Block a user