summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Avatars/AvatarManager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Swiften/Avatars/AvatarManager.cpp b/Swiften/Avatars/AvatarManager.cpp
index 7abbb8b..42451af 100644
--- a/Swiften/Avatars/AvatarManager.cpp
+++ b/Swiften/Avatars/AvatarManager.cpp
@@ -53,6 +53,11 @@ void AvatarManager::handleVCardReceived(const JID& from, const String& promisedH
std::cerr << "Warning: " << from << ": Could not get vCard" << std::endl;
return;
}
+ if (!vCard) {
+ std::cerr << "Warning: " << from << ": null vcard payload" << std::endl;
+ //FIXME: Why could this happen?
+ return;
+ }
String realHash = Hexify::hexify(SHA1::getHash(vCard->getPhoto()));
if (promisedHash != realHash) {
std::cerr << "Warning: " << from << ": Got different vCard photo hash (" << promisedHash << " != " << realHash << ")" << std::endl;