summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-09 20:14:27 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-09 20:14:27 (GMT)
commitf0fec4f31afcc91a55d72aad462a0cc571aacf5d (patch)
tree8bc95d0972ac590f5b1724327b6dd6eea3d7831e /Swiften/VCards
parent71dc17f69a75e15b31c935ce1323a269bc96ed62 (diff)
downloadswift-f0fec4f31afcc91a55d72aad462a0cc571aacf5d.zip
swift-f0fec4f31afcc91a55d72aad462a0cc571aacf5d.tar.bz2
Don't crash when we don't get a vcard.
Diffstat (limited to 'Swiften/VCards')
-rw-r--r--Swiften/VCards/VCardManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/VCards/VCardManager.cpp b/Swiften/VCards/VCardManager.cpp
index e0d3553..8d695d4 100644
--- a/Swiften/VCards/VCardManager.cpp
+++ b/Swiften/VCards/VCardManager.cpp
@@ -46,7 +46,7 @@ void VCardManager::requestOwnVCard() {
void VCardManager::handleVCardReceived(const JID& actualJID, VCard::ref vcard, ErrorPayload::ref error) {
- if (error) {
+ if (error || !vcard) {
vcard = VCard::ref(new VCard());
}
requestedVCards.erase(actualJID);