aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-01-26 23:25:04 +0100
committerChristian Schneppe <christian@pix-art.de>2019-01-26 23:25:16 +0100
commitf24e15e2e9f5b5784a716184aa9f51bc1b2a70cb (patch)
treea99ced23eaf68af8abfd6b876f72bb8a430a2103 /src/main/java/de
parent5cf82e9c8a0c225dbbc30ffe854c65d6e6871d08 (diff)
catch NPE while getting Display Name
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java6
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);