# HG changeset patch # User Eric Warmenhoven # Date 1003160905 0 # Node ID bb6fbe78a3c8e1144f74b84d975dcca2abd4d409 # Parent 7b25903b6c0f8072e7016fe5fb9d89a58319501e [gaim-migrate @ 2522] hopefully this should fix a segfault committer: Tailor Script diff -r 7b25903b6c0f -r bb6fbe78a3c8 src/protocols/yahoo/yay.c --- 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);