Commit 884c8812 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[JM-1240] Fixed NPE when removing PHOTO. (deleting avatar)

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9739 b35dd754-fafc-0310-a699-88a17e54d16e
parent 06dc425e
......@@ -378,10 +378,12 @@ public class LdapVCardProvider implements VCardProvider, PropertyEventListener {
}
else {
Element newPhotoElem = newvCard.element("PHOTO");
if (newPhotoElem == null) {
Log.debug("LdapVCardProvider: Photo element was removed, accepting update.");
return true;
}
// Note: NodeComparator never seems to consider these equal, even if they are?
if (!dbPhotoElem.asXML().equals(newPhotoElem.asXML())) {
Log.debug("LdapVCardProvider: DB photo element is:\n"+dbPhotoElem.asXML());
Log.debug("LdapVCardProvider: New photo element is:\n"+newPhotoElem.asXML());
// Photo element was changed. Ignore all other changes and accept this.
Log.debug("LdapVCardProvider: PHOTO element changed, accepting update.");
return true;
......
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