Commit a67798f6 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[JM-1240] Fixed another NPE when removing PHOTO.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9742 b35dd754-fafc-0310-a699-88a17e54d16e
parent 884c8812
......@@ -247,6 +247,10 @@ public class LdapVCardProvider implements VCardProvider, PropertyEventListener {
// No vcard passed in? Hrm. Fine, return LDAP vcard.
return vcard;
}
if (mergeVCard.element("PHOTO") == null) {
// Merged vcard has no photo element, return LDAP vcard as is.
return vcard;
}
Element photoElement = mergeVCard.element("PHOTO").createCopy();
if (photoElement == null || photoElement.element("BINVAL") == null || photoElement.element("BINVAL").getText().matches("\\s*")) {
// We were passed something null or empty, so lets just return the LDAP based vcard.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment