aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--protocols/yahoo/yahoo.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c
index 9da12949..cdbfd24c 100644
--- a/protocols/yahoo/yahoo.c
+++ b/protocols/yahoo/yahoo.c
@@ -439,8 +439,16 @@ struct byahoo_connect_callback_data {
void byahoo_connect_callback(gpointer data, gint source, b_input_condition cond)
{
struct byahoo_connect_callback_data *d = data;
+ struct im_connection *ic;
- if (!byahoo_get_ic_by_id(d->id)) {
+ if (!(ic = byahoo_get_ic_by_id(d->id))) {
+ g_free(d);
+ return;
+ }
+
+ if (source == -1) {
+ imcb_error(ic, "Could not connect to server");
+ imc_logout(ic, TRUE);
g_free(d);
return;
}