diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-03-20 21:59:02 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-03-20 22:00:39 (GMT) |
commit | 37a3ff6afe96c39bbf075d05da72e5f2c684dfa4 (patch) | |
tree | 1e17e9bd4df7995e1fdbc247486ef005f208fca9 | |
parent | cd1801ca176553c2c1727745228cdd2f076b62a5 (diff) | |
download | swift-37a3ff6afe96c39bbf075d05da72e5f2c684dfa4.zip swift-37a3ff6afe96c39bbf075d05da72e5f2c684dfa4.tar.bz2 |
Fix for segfault when joining jdev tonight
-rw-r--r-- | Swiften/Avatars/AvatarManager.cpp | 5 |
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; |