From f24e15e2e9f5b5784a716184aa9f51bc1b2a70cb Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 26 Jan 2019 23:25:04 +0100 Subject: catch NPE while getting Display Name --- src/main/java/de/pixart/messenger/ui/EditAccountActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/de/pixart/messenger') 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); -- cgit v1.2.3