Fix NPE in MUCItem if role is null

This commit is contained in:
Florian Schmaus 2014-10-20 21:12:33 +02:00
parent dfc4173e5b
commit 5d963f7f9b
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ public class MUCItem implements NamedElement {
xml.optAttribute("affiliation", getAffiliation());
xml.optAttribute("jid", getJid());
xml.optAttribute("nick", getNick());
if (role != MUCRole.none) {
if (role != null && role != MUCRole.none) {
xml.attribute("role", getRole());
}
xml.rightAngleBracket();