changeset 15607:66dc2367b137

If jabber_ssl_connect_failure() is called because a connect attempt fails, but the user has already canceled the attempt by signing the account offline, this would previously crash. It now does not.
author Evan Schoenberg <evan.s@dreskin.net>
date Tue, 13 Feb 2007 05:00:49 +0000
parents b74030931888
children fc586f7f23bd 2f0f563b3579
files libpurple/protocols/jabber/jabber.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Sat Feb 10 01:10:15 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Tue Feb 13 05:00:49 2007 +0000
@@ -475,8 +475,13 @@
 		gpointer data)
 {
 	GaimConnection *gc = data;
-	JabberStream *js = gc->proto_data;
+	JabberStream *js;
 
+	/* If the connection is already disconnected, we don't need to do anything else */
+	if(!GAIM_CONNECTION_IS_VALID(gc))
+		return;
+
+	js = gc->proto_data;
 	js->gsc = NULL;
 
 	switch(error) {