# HG changeset patch # User Christian Hammond # Date 1057301001 0 # Node ID 9ab75d4fafac6536e9931bc318e31271f29eb111 # Parent 4c16227f7cd9c25b211d00460fa6c72149111d8a [gaim-migrate @ 6461] This should fix any crashes or infinite loops when calling gaim_connection_error(), followed by gaim_connection_disconnect(). committer: Tailor Script diff -r 4c16227f7cd9 -r 9ab75d4fafac src/connection.c --- a/src/connection.c Fri Jul 04 06:10:33 2003 +0000 +++ b/src/connection.c Fri Jul 04 06:43:21 2003 +0000 @@ -350,7 +350,14 @@ static gboolean disconnect_conn_cb(gpointer data) { - gaim_connection_disconnect(data); + GaimAccount *account = (GaimAccount *)data; + GaimConnection *gc; + + gc = gaim_account_get_connection(account); + + if (gc != NULL) + gaim_connection_disconnect(data); + return FALSE; } @@ -367,7 +374,7 @@ if (ops != NULL && ops->disconnected != NULL) ops->disconnected(gc, text); - g_timeout_add(0, disconnect_conn_cb, gc); + g_timeout_add(0, disconnect_conn_cb, gaim_connection_get_account(gc)); } void