diff options
author | zeapo <mohamed@zenadi.com> | 2014-11-05 07:27:33 +0100 |
---|---|---|
committer | zeapo <mohamed@zenadi.com> | 2014-11-05 07:36:17 +0100 |
commit | ebb91f3e68db121760af346642df14948f5a021d (patch) | |
tree | f25f37d6f65c40efcd3c2dd2d76bb3f0cacc757e /app/src/main/java | |
parent | 674687ddcfcc3b0b5c93be1879ce7d8383c83ba8 (diff) |
should not happen but a user got a NPE due non-existing view
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 4 |
1 files changed, 4 insertions, 0 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 d8b3c1b2..97856fd2 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -143,6 +143,10 @@ public class PgpHandler extends ActionBarActivity implements OpenPgpServiceConne } public void copyToClipBoard() { + + if (findViewById(R.id.crypto_password_show) == null) + return; + ClipData clip = ClipData.newPlainText("pgp_handler_result_pm", ((TextView) findViewById(R.id.crypto_password_show)).getText()); clipboard.setPrimaryClip(clip); showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text) |