[gaim-migrate @ 2522]

Mon, 15 Oct 2001 15:48:25 +0000

author
Eric Warmenhoven <warmenhoven@yahoo.com>
date
Mon, 15 Oct 2001 15:48:25 +0000
changeset 2509
7c2deedb3be4
parent 2508
4bdc104c4911
child 2510
047693f717d7

[gaim-migrate @ 2522]
hopefully this should fix a segfault

src/protocols/yahoo/yay.c file | annotate | diff | comparison | revisions
--- a/src/protocols/yahoo/yay.c	Mon Oct 15 05:04:04 2001 +0000
+++ b/src/protocols/yahoo/yay.c	Mon Oct 15 15:48:25 2001 +0000
@@ -294,7 +294,12 @@
 
 static void yahoo_notify(struct yahoo_session *sess, int socket, int type, int cont) {
 	struct gaim_connection *gc = sess->user_data;
-	struct yahoo_data *yd = gc->proto_data;
+	struct yahoo_data *yd;
+
+	if (!g_slist_find(connections, gc))
+		return;
+	
+	yd = gc->proto_data;
 
 	if (cont) {
 		struct conn *c = g_new0(struct conn, 1);
@@ -319,6 +324,13 @@
 
 static void yahoo_got_connected(gpointer data, gint source, GaimInputCondition cond) {
 	struct connect *con = data;
+	struct gaim_connection *gc = con->sess->user_data;
+
+	if (!g_slist_find(connections, gc)) {
+		close(source);
+		g_free(con);
+		return;
+	}
 
 	debug_printf("got connected (possibly)\n");
 	yahoo_connected(con->sess, con->data, source);

mercurial