fixed potential NPEs

This commit is contained in:
iNPUTmice 2014-11-20 18:42:47 +01:00
parent a142dcc263
commit a207240881

View file

@ -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");