From be915da04068a412dd63a597192ec3232ad4e1c2 Mon Sep 17 00:00:00 2001
From: Richard Maudsley <richard.maudsley@isode.com>
Date: Thu, 29 May 2014 14:34:06 +0100
Subject: Fix avatar not being updated when cleared

Change-Id: I4cf2d1d5500d0f50fbbcb455525123e9aa1ed948

diff --git a/Swift/Controllers/Storages/VCardFileStorage.cpp b/Swift/Controllers/Storages/VCardFileStorage.cpp
index b22e235..b101ecf 100644
--- a/Swift/Controllers/Storages/VCardFileStorage.cpp
+++ b/Swift/Controllers/Storages/VCardFileStorage.cpp
@@ -88,7 +88,7 @@ std::string VCardFileStorage::getPhotoHash(const JID& jid) const {
 
 std::string VCardFileStorage::getAndUpdatePhotoHash(const JID& jid, VCard::ref vCard) const {
 	std::string hash;
-	if (vCard && !vCard->getPhoto().empty()) {
+	if (vCard) {
 		hash = Hexify::hexify(crypto->getSHA1Hash(vCard->getPhoto()));
 	}
 	std::pair<PhotoHashMap::iterator, bool> r = photoHashes.insert(std::make_pair(jid, hash));
-- 
cgit v0.10.2-6-g49f6