From 10c43c39dfd926e7a70ce8a68e33859acf681404 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Wed, 14 Nov 2012 08:05:35 +0000 Subject: Fix crash on receiving bad data (security labels) Change-Id: I883613fb35b4d53b7b026b500eb5efaad006864a diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp index 4f1bb71..50709f7 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp @@ -152,7 +152,7 @@ void ChatControllerBase::handleSendMessageRequest(const std::string &body, bool } void ChatControllerBase::handleSecurityLabelsCatalogResponse(boost::shared_ptr catalog, ErrorPayload::ref error) { - if (!error) { + if (catalog && !error) { if (catalog->getItems().size() == 0) { chatWindow_->setSecurityLabelsEnabled(false); labelsEnabled_ = false; -- cgit v0.10.2-6-g49f6