aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-29 15:07:27 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-29 15:07:27 +0200
commita1f97130317d1bd41c9be2559dbef215c0633fe7 (patch)
tree0591f49383973ef6981c981cff74ddd840b4211d /src/main/java/de/pixart/messenger
parent71f60cfc3ff9b90d8e53b1e54190761aaf0bd0b3 (diff)
fixed npe when conversation in multi mode had jid w/o local part
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Conversation.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java
index 1e87b7ec5..705b14cc3 100644
--- a/src/main/java/de/pixart/messenger/entities/Conversation.java
+++ b/src/main/java/de/pixart/messenger/entities/Conversation.java
@@ -516,7 +516,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
}
}
- public CharSequence getName() {
+ public @NonNull CharSequence getName() {
if (getMode() == MODE_MULTI) {
final String subject = getMucOptions().getSubject();
final Bookmark bookmark = getBookmark();
@@ -530,7 +530,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
if (printableValue(generatedName)) {
return generatedName;
} else {
- return getJid().getLocal();
+ return contactJid.getLocal() != null ? contactJid.getLocal() : contactJid;
}
}
} else if (isWithStranger()) {