pidgin: ee1e56ea: Reset some global data when uninit-ing. ...
sadrul at pidgin.im
sadrul at pidgin.im
Sat Apr 11 02:40:41 EDT 2009
-----------------------------------------------------------------
Revision: ee1e56ea3b5a9fff50cec62293741896b6b0369e
Ancestor: 27935bed3e3568d2eb5cd1cb46efdc8f3c22f32b
Author: sadrul at pidgin.im
Date: 2009-04-11T06:01:36
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ee1e56ea3b5a9fff50cec62293741896b6b0369e
Modified files:
libpurple/account.c libpurple/blist.c
ChangeLog:
Reset some global data when uninit-ing. Fixes a crash on quit.
-------------- next part --------------
============================================================
--- libpurple/account.c d7d0887168b48bcc3eba8706583c05ec55e7136f
+++ libpurple/account.c 1381740959655ea35b24368ed79f9de5ebd31bea
@@ -2787,7 +2787,6 @@ purple_accounts_uninit(void)
void
purple_accounts_uninit(void)
{
- GList* account;
gpointer handle = purple_accounts_get_handle();
if (save_timer != 0)
{
@@ -2799,9 +2798,6 @@ purple_accounts_uninit(void)
purple_signals_disconnect_by_handle(handle);
purple_signals_unregister_by_instance(handle);
- account = purple_accounts_get_all();
- while (account) {
- purple_account_destroy(account->data);
- account = g_list_delete_link(account, account);
- }
+ for (; accounts; accounts = g_list_delete_link(accounts, accounts))
+ purple_account_destroy(accounts->data);
}
============================================================
--- libpurple/blist.c 13be96798de3c2e52b38a9e6381974820b90ffd2
+++ libpurple/blist.c bdffae5a2c5b75a9fb4584544b2a2e02f22c6a35
@@ -2616,7 +2616,7 @@ purple_blist_node_destroy(PurpleBlistNod
purple_blist_node_destroy(PurpleBlistNode *node)
{
PurpleBlistNode *child, *next_child;
-
+
child = node->child;
while (child) {
next_child = child->next;
@@ -2936,6 +2936,7 @@ purple_blist_uninit(void)
purple_blist_node_destroy(node);
node = next_node;
}
+ purplebuddylist->root = NULL;
purple_signals_unregister_by_instance(purple_blist_get_handle());
}
More information about the Commits
mailing list