aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index 407a967a7..573e7078f 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -162,7 +162,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url.toString())));
return;
} catch (ActivityNotFoundException e) {
- Toast.makeText(EditAccountActivity.this, R.string.application_found_to_open_website, Toast.LENGTH_SHORT);
+ Toast.makeText(EditAccountActivity.this, R.string.application_found_to_open_website, Toast.LENGTH_SHORT).show();
return;
}
}
@@ -174,7 +174,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
} else {
jid = Jid.of(binding.accountJid.getText().toString());
}
- } catch (final IllegalArgumentException e) {
+ } catch (final NullPointerException | IllegalArgumentException e) {
if (mUsernameMode) {
mAccountJidLayout.setError(getString(R.string.invalid_username));
} else {
@@ -783,7 +783,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
}
private String getUserModeDomain() {
- if (mAccount != null) {
+ if (mAccount != null && mAccount.getJid().getDomain() != null) {
return mAccount.getJid().getDomain();
} else {
return Config.DOMAIN_LOCK;