Mercurial > pidgin
changeset 2509:bb6fbe78a3c8
[gaim-migrate @ 2522]
hopefully this should fix a segfault
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 15 Oct 2001 15:48:25 +0000 |
parents | 7b25903b6c0f |
children | 1950afffd107 |
files | src/protocols/yahoo/yay.c |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);