Mercurial > pidgin
diff finch/gntconv.c @ 21207:a59f65876d45
propagate from branch 'im.pidgin.pidgin' (head abd68a0284028e1f6620c0f7ef517a13458d49d1)
to branch 'next.minor' (head 57a14e044355de6354ee22a32331f970598c6b02)
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 19 Sep 2007 11:00:49 +0000 |
parents | b7460582a135 |
children | bed3c9affda6 |
line wrap: on
line diff
--- a/finch/gntconv.c Wed Sep 19 08:26:30 2007 +0000 +++ b/finch/gntconv.c Wed Sep 19 11:00:49 2007 +0000 @@ -326,8 +326,8 @@ list = purple_get_chats(); while (list) { PurpleConversation *conv = list->data; - gboolean del = FALSE; PurpleChat *chat; + GHashTable *comps = NULL; list = list->next; if (conv->account != gc->account || @@ -336,15 +336,14 @@ chat = purple_blist_find_chat(conv->account, conv->name); if (chat == NULL) { - GHashTable *hash = NULL; if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults != NULL) - hash = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults(gc, conv->name); - chat = purple_chat_new(gc->account, conv->name, hash); - del = TRUE; + comps = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults(gc, conv->name); + } else { + comps = chat->components; } - serv_join_chat(gc, chat->components); - if (del) - purple_blist_remove_chat(chat); + serv_join_chat(gc, comps); + if (chat == NULL && comps != NULL) + g_hash_table_destroy(comps); } } }