summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-11-14 08:05:35 (GMT)
committerSwift Review <review@swift.im>2012-11-14 09:53:48 (GMT)
commit10c43c39dfd926e7a70ce8a68e33859acf681404 (patch)
treee2f0c28dfd6c8e726171f83aa4ad6697e3078dba
parentbf348a923a03c864367a61e78fa2bbd986992e78 (diff)
downloadswift-contrib-10c43c39dfd926e7a70ce8a68e33859acf681404.zip
swift-contrib-10c43c39dfd926e7a70ce8a68e33859acf681404.tar.bz2
Fix crash on receiving bad data (security labels)
Change-Id: I883613fb35b4d53b7b026b500eb5efaad006864a
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.cpp2
1 files changed, 1 insertions, 1 deletions
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<SecurityLabelsCatalog> catalog, ErrorPayload::ref error) {
- if (!error) {
+ if (catalog && !error) {
if (catalog->getItems().size() == 0) {
chatWindow_->setSecurityLabelsEnabled(false);
labelsEnabled_ = false;