fixed potential NPEs
This commit is contained in:
parent
a142dcc263
commit
a207240881
|
@ -344,8 +344,13 @@ public class MessageParser extends AbstractParser implements
|
|||
|
||||
private void parseEvent(final Element event, final Jid from, final Account account) {
|
||||
Element items = event.findChild("items");
|
||||
if (items == null) {
|
||||
return;
|
||||
}
|
||||
String node = items.getAttribute("node");
|
||||
if (node != null) {
|
||||
if (node == null) {
|
||||
return;
|
||||
}
|
||||
if (node.equals("urn:xmpp:avatar:metadata")) {
|
||||
Avatar avatar = Avatar.parseMetadata(items);
|
||||
if (avatar != null) {
|
||||
|
@ -392,7 +397,6 @@ public class MessageParser extends AbstractParser implements
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getPgpBody(Element message) {
|
||||
Element child = message.findChild("x", "jabber:x:encrypted");
|
||||
|
|
Loading…
Reference in New Issue