summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-03-20 21:59:02 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-03-20 22:00:39 (GMT)
commit37a3ff6afe96c39bbf075d05da72e5f2c684dfa4 (patch)
tree1e17e9bd4df7995e1fdbc247486ef005f208fca9 /Swiften/Avatars
parentcd1801ca176553c2c1727745228cdd2f076b62a5 (diff)
downloadswift-37a3ff6afe96c39bbf075d05da72e5f2c684dfa4.zip
swift-37a3ff6afe96c39bbf075d05da72e5f2c684dfa4.tar.bz2
Fix for segfault when joining jdev tonight
Diffstat (limited to 'Swiften/Avatars')
-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;