# HG changeset patch # User Christian Hammond # Date 1066758117 0 # Node ID 1c8830db0189d4c745f0ecac511589ec587a7f83 # Parent dd4b4a187171b1c0c81c8a73d6be5615665f96df [gaim-migrate @ 7895] Conversation windows kept a GaimBuddyIcon set even after the icon was destroyed. Now all conversations containing the icon being destroyed are updated to remove the icon. This fixes bug #826527, which javabsp closed a bit too prematurely ;) However, because GaimConversation references it, this should never actually happen, so I suspect something else is happening, but sanity statements are good anyway. committer: Tailor Script diff -r dd4b4a187171 -r 1c8830db0189 src/buddyicon.c --- a/src/buddyicon.c Tue Oct 21 17:18:46 2003 +0000 +++ b/src/buddyicon.c Tue Oct 21 17:41:57 2003 +0000 @@ -75,7 +75,10 @@ void gaim_buddy_icon_destroy(GaimBuddyIcon *icon) { + GaimConversation *conv; + GaimAccount *account; GHashTable *icon_cache; + const char *username; g_return_if_fail(icon != NULL); @@ -86,6 +89,14 @@ return; } + account = gaim_buddy_icon_get_account(icon); + username = gaim_buddy_icon_get_username(icon); + + conv = gaim_find_conversation_with_account(username, account); + + if (conv != NULL && gaim_conversation_get_type(conv) == GAIM_CONV_IM) + gaim_conv_im_set_icon(GAIM_CONV_IM(conv), NULL); + icon_cache = g_hash_table_lookup(account_cache, gaim_buddy_icon_get_account(icon));