1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-26 08:12:05 +01:00

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

View file

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