From: David Woodhouse Date: Tue, 5 Dec 2017 23:44:39 +0000 (+0000) Subject: Destroy chats on disconnect X-Git-Tag: v0.9~100 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d1be5b525d9fb8bcce6c984e22d89ba30b21c4c3;p=pidgin-chime.git Destroy chats on disconnect --- diff --git a/chat.c b/chat.c index 296df79..848a345 100644 --- a/chat.c +++ b/chat.c @@ -508,6 +508,11 @@ void purple_chime_init_chats(struct purple_chime *pc) void purple_chime_destroy_chats(struct purple_chime *pc) { + GList *chats = g_hash_table_get_values(pc->live_chats); + while (chats) { + chime_destroy_chat(chats->data); + chats = g_list_remove(chats, chats->data); + } g_clear_pointer(&pc->live_chats, g_hash_table_unref); g_clear_pointer(&pc->chats_by_room, g_hash_table_unref); g_clear_pointer(&pc->mention_regex, g_regex_unref);