From 2c1104c7d78b9ac9a5611345f64c7b7ce4a167d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Mon, 23 Nov 2009 21:05:58 +0100
Subject: Avoid segfault when using EXTERNAL.


diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp
index 960af70..61ce8ef 100644
--- a/Swiften/Client/ClientSession.cpp
+++ b/Swiften/Client/ClientSession.cpp
@@ -132,7 +132,7 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) {
 	}
 	else if (AuthSuccess* authSuccess = dynamic_cast<AuthSuccess*>(element.get())) {
 		checkState(Authenticating);
-		if (!authenticator->setChallenge(authSuccess->getValue())) {
+		if (authenticator && !authenticator->setChallenge(authSuccess->getValue())) {
 			finishSession(Error::ServerVerificationFailedError);
 		}
 		else {
-- 
cgit v0.10.2-6-g49f6