Mercurial > pidgin
diff src/oscar.c @ 1974:db1b719c66cf
[gaim-migrate @ 1984]
No more crashy on confirm accoiunt.
committer: Tailor Script <tailor@pidgin.im>
| author | Rob Flynn <gaim@robflynn.com> |
|---|---|
| date | Fri, 08 Jun 2001 05:11:56 +0000 |
| parents | 1bd70305b227 |
| children | 7b3f1eb1ef7d |
line wrap: on
line diff
--- a/src/oscar.c Thu Jun 07 21:50:03 2001 +0000 +++ b/src/oscar.c Fri Jun 08 05:11:56 2001 +0000 @@ -344,11 +344,20 @@ GdkInputCondition condition) { struct aim_conn_t *conn = (struct aim_conn_t *)data; struct gaim_connection *gc = find_gaim_conn_by_oscar_conn(conn); - struct oscar_data *odata = (struct oscar_data *)gc->proto_data; + struct oscar_data *odata; + + if (!gc) { + /* gc is null. we return, else we seg SIGSEG on next line. */ + debug_printf("oscar callback for closed connection (1).\n"); + return; + } + + odata = (struct oscar_data *)gc->proto_data; + if (!g_slist_find(connections, gc)) { - /* oh boy. this is probably bad. i guess the only thing we can really do - * is return? */ - debug_printf("oscar callback for closed connection.\n"); + /* oh boy. this is probably bad. i guess the only thing we + * can really do is return? */ + debug_printf("oscar callback for closed connection (2).\n"); return; }
