From f0fec4f31afcc91a55d72aad462a0cc571aacf5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Thu, 9 Dec 2010 21:14:27 +0100
Subject: Don't crash when we don't get a vcard.


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);
-- 
cgit v0.10.2-6-g49f6