From c1b98cacaf627481d13f974e3cd6653feabf41f7 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Wed, 24 Feb 2010 22:45:54 +0000
Subject: Fix segfault on auth failure


diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index 074369e..cbfb065 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -335,7 +335,9 @@ void MainController::logout() {
 }
 
 void MainController::setManagersEnabled(bool enabled) {
-	chatsManager_->setEnabled(enabled);
+	if (chatsManager_) {
+		chatsManager_->setEnabled(enabled);
+	}
 	if (rosterController_) {
 		rosterController_->setEnabled(enabled);
 	}
-- 
cgit v0.10.2-6-g49f6