From 7c390ba81bed34003119a9e39695c4e5c2910313 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Wed, 26 Aug 2015 04:09:08 -0400 Subject: Fix edit button crashing if pressed from encrypt --- app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3