fixed npe when calling changepassword activity directly

This commit is contained in:
Daniel Gultsch 2016-05-04 18:22:17 +02:00
parent 16eb1bfbd0
commit fb41a4ffaa
1 changed files with 4 additions and 2 deletions

View File

@ -86,9 +86,11 @@ public class ChangePasswordActivity extends XmppActivity implements XmppConnecti
protected void onStart() { protected void onStart() {
super.onStart(); super.onStart();
Intent intent = getIntent(); Intent intent = getIntent();
String password = intent != null ? intent.getStringExtra("password") : ""; String password = intent != null ? intent.getStringExtra("password") : null;
if (password != null) {
this.mNewPassword.getEditableText().append(password); this.mNewPassword.getEditableText().append(password);
} }
}
@Override @Override
public void onPasswordChangeSucceeded() { public void onPasswordChangeSucceeded() {