Mercurial > pidgin.yaz
diff src/status.c @ 10077:0fb9cf6b9240
[gaim-migrate @ 11058]
Don't destroy the global hash table of buddy presences each time we destroy a
single presence. Also, having a non-zero refcount isn't an error.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 03 Oct 2004 17:53:29 +0000 |
parents | 39142bdd5ba6 |
children | 9fdbfe832fac |
line wrap: on
line diff
--- a/src/status.c Sun Oct 03 15:37:44 2004 +0000 +++ b/src/status.c Sun Oct 03 17:53:29 2004 +0000 @@ -1016,7 +1016,8 @@ presence->u.buddy.ref_count--; - g_return_if_fail(presence->u.buddy.ref_count == 0); + if(presence->u.buddy.ref_count != 0) + return; key.account = presence->u.buddy.account; key.name = presence->u.buddy.name; @@ -1032,9 +1033,6 @@ g_free(presence->u.chat.user); } - if (buddy_presences != NULL) - g_hash_table_destroy(buddy_presences); - if (presence->statuses != NULL) g_list_free(presence->statuses); @@ -1580,6 +1578,9 @@ void gaim_statuses_uninit(void) { + if(buddy_presences != NULL) + g_hash_table_destroy(buddy_presences); + buddy_presences = NULL; } void