Fix edit button crashing if pressed from encrypt

This commit is contained in:
Matthew Wong
2015-08-26 04:09:08 -04:00
parent c54d28af8a
commit 7c390ba81b

View File

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