diff options
author | Matthew Wong <wongma7@outlook.com> | 2015-08-26 04:09:08 -0400 |
---|---|---|
committer | Matthew Wong <wongma7@outlook.com> | 2015-08-26 04:09:08 -0400 |
commit | 7c390ba81bed34003119a9e39695c4e5c2910313 (patch) | |
tree | 609879e1cc0f56ac5d63ee2978653c4b24479607 | |
parent | c54d28af8a0366b195019e153b276e5d570684ec (diff) |
Fix edit button crashing if pressed from encrypt
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java index d7664780..d44b4214 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -146,7 +146,9 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne public void editPassword() { - if (findViewById(R.id.crypto_container).getVisibility() != View.VISIBLE) + // if in encrypt or (in decrypt and password is invisible), do nothing + if (findViewById(R.id.crypto_password_show) == null + || findViewById(R.id.crypto_container).getVisibility() != View.VISIBLE) return; CharSequence category = ((TextView) findViewById(R.id.crypto_password_category)).getText(); |