# HG changeset patch # User Mark Doliner # Date 1185094452 0 # Node ID 784f98a1bc7f6ea605e61294353c7beee1151b9a # Parent 56886bde453594526133362e336a3b33817d6f1e# Parent c5be17bbb6e4674f338e5fc53293ee31bccb013e merge of 'b8d63ebbffba2503d6e449e02a44a2eedcc41d85' and 'fd7ea41ed6cbadab8f0cb49200276a59211e8ae6' diff -r 56886bde4535 -r 784f98a1bc7f libpurple/protocols/oscar/oscar.c --- a/libpurple/protocols/oscar/oscar.c Sun Jul 22 08:33:49 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Sun Jul 22 08:54:12 2007 +0000 @@ -1431,7 +1431,6 @@ purple_parse_auth_securid_request_no_cb(gpointer user_data, const char *value) { PurpleConnection *gc = user_data; - OscarData *od = gc->proto_data; /* Disconnect */ gc->wants_to_die = TRUE; @@ -3473,25 +3472,28 @@ if (conn->type == SNAC_FAMILY_CHAT) { struct chat_connection *cc; - PurpleConversation *conv; + PurpleConversation *conv = NULL; cc = find_oscar_chat_by_conn(gc, conn); - conv = purple_find_chat(gc, cc->id); - - if (conv != NULL) + if (cc != NULL) { - /* - * TOOD: Have flap_connection_destroy_cb() send us the - * error message stored in 'tmp', which should be - * human-friendly, and print that to the chat room. - */ - gchar *buf; - buf = g_strdup_printf(_("You have been disconnected from chat " - "room %s."), cc->name); - purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_ERROR, time(NULL)); - g_free(buf); + conv = purple_find_chat(gc, cc->id); + + if (conv != NULL) + { + /* + * TOOD: Have flap_connection_destroy_cb() send us the + * error message stored in 'tmp', which should be + * human-friendly, and print that to the chat room. + */ + gchar *buf; + buf = g_strdup_printf(_("You have been disconnected from chat " + "room %s."), cc->name); + purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_ERROR, time(NULL)); + g_free(buf); + } + oscar_chat_kill(gc, cc); } - oscar_chat_kill(gc, cc); } return 1;