diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-01-26 23:25:04 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-01-26 23:25:16 +0100 |
commit | f24e15e2e9f5b5784a716184aa9f51bc1b2a70cb (patch) | |
tree | a99ced23eaf68af8abfd6b876f72bb8a430a2103 /src/main/java/de/pixart | |
parent | 5cf82e9c8a0c225dbbc30ffe854c65d6e6871d08 (diff) |
catch NPE while getting Display Name
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/EditAccountActivity.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java index beddb195d..a380a3368 100644 --- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java +++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java @@ -624,7 +624,11 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat } private void onEditYourNameClicked(View view) { - quickEdit(mAccount.getDisplayName(), R.string.your_name, value -> { + String nick = ""; + if (mAccount.getDisplayName() != null) { + nick = mAccount.getDisplayName(); + } + quickEdit(nick, R.string.your_name, value -> { final String displayName = value.trim(); updateDisplayName(displayName); mAccount.setDisplayName(displayName); |