From 08d137d71e23d8237e788750bd32ad5901058031 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Mon, 27 Dec 2010 22:50:26 +0100
Subject: Fixed crash on disconnect.


diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp
index 46b4cbb..0a684b1 100644
--- a/Swiften/Client/CoreClient.cpp
+++ b/Swiften/Client/CoreClient.cpp
@@ -93,7 +93,7 @@ void CoreClient::disconnect() {
 	// FIXME: We should be able to do without this boolean. We just have to make sure we can tell the difference between
 	// connector finishing without a connection due to an error or because of a disconnect.
 	disconnectRequested_ = true;
-	if (!session_->isFinished()) {
+	if (session_ && !session_->isFinished()) {
 		session_->finish();
 	}
 	else if (connector_) {
-- 
cgit v0.10.2-6-g49f6