From fb41a4ffaa8aa8d47955cbb75cc0ba97107517a3 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 4 May 2016 18:22:17 +0200 Subject: [PATCH] fixed npe when calling changepassword activity directly --- .../eu/siacs/conversations/ui/ChangePasswordActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ChangePasswordActivity.java b/src/main/java/eu/siacs/conversations/ui/ChangePasswordActivity.java index d4ef40901..750a1da3d 100644 --- a/src/main/java/eu/siacs/conversations/ui/ChangePasswordActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ChangePasswordActivity.java @@ -86,8 +86,10 @@ public class ChangePasswordActivity extends XmppActivity implements XmppConnecti protected void onStart() { super.onStart(); Intent intent = getIntent(); - String password = intent != null ? intent.getStringExtra("password") : ""; - this.mNewPassword.getEditableText().append(password); + String password = intent != null ? intent.getStringExtra("password") : null; + if (password != null) { + this.mNewPassword.getEditableText().append(password); + } } @Override