summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swift/Controllers/MainController.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index 35a26f3..d8781c8 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -420,6 +420,9 @@ void MainController::handleServerDiscoInfoResponse(boost::shared_ptr<DiscoInfo>
}
void MainController::handleOwnVCardReceived(boost::shared_ptr<VCard> vCard, const boost::optional<ErrorPayload>& error) {
+ if (!vCard) {
+ return;
+ }
if (!error && !vCard->getPhoto().isEmpty()) {
vCardPhotoHash_ = Hexify::hexify(SHA1::getHash(vCard->getPhoto()));
if (lastSentPresence_) {