diff libpurple/protocols/jabber/jabber.c @ 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 0d4890637238
children 193456f03b9c
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) {