fixed npe when conversation in multi mode had jid w/o local part

This commit is contained in:
Daniel Gultsch 2018-04-18 10:24:57 +02:00
parent 71461543a3
commit 5170e526c8
1 changed files with 2 additions and 2 deletions

View File

@ -484,7 +484,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();
@ -498,7 +498,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()) {