# HG changeset patch # User Mark Doliner # Date 1139443812 0 # Node ID c242836ff793fe8983c8e0eceeecc1de34055927 # Parent 7099a443131dfe1fdb1756370e482396df8e3200 [gaim-migrate @ 15558] sf patch #1421206, from Sadrul Habib Chowdhury Fix a crash when renaming a group to an already existing group name (sf bug #1421118) committer: Tailor Script diff -r 7099a443131d -r c242836ff793 src/blist.c --- a/src/blist.c Thu Feb 09 00:00:08 2006 +0000 +++ b/src/blist.c Thu Feb 09 00:10:12 2006 +0000 @@ -994,6 +994,7 @@ /* Make a copy of the old group name and then delete the old group */ old_name = g_strdup(source->name); gaim_blist_remove_group(source); + source = dest; } else { /* A simple rename */ GaimBlistNode *cnode, *bnode; @@ -1007,7 +1008,6 @@ old_name = source->name; source->name = g_strdup(new_name); - } /* Save our changes */ @@ -1018,6 +1018,7 @@ ops->update(gaimbuddylist, (GaimBlistNode*)source); /* Notify all PRPLs */ + /* TODO: Is this condition needed? Seems like it would always be TRUE */ if(old_name && source && strcmp(source->name, old_name)) { for (accts = gaim_group_get_accounts(source); accts; accts = g_slist_remove(accts, accts->data)) { GaimAccount *account = accts->data; diff -r 7099a443131d -r c242836ff793 src/gtkblist.c --- a/src/gtkblist.c Thu Feb 09 00:00:08 2006 +0000 +++ b/src/gtkblist.c Thu Feb 09 00:10:12 2006 +0000 @@ -4022,7 +4022,7 @@ count = gaim_blist_get_group_size(group, FALSE); else count = gaim_blist_get_group_online_count(group); - + if (count > 0 || gaim_prefs_get_bool("/gaim/gtk/blist/show_empty_groups")) show = TRUE; else { @@ -4033,7 +4033,7 @@ if (buddy_is_displayable((GaimBuddy*)n)) { show = TRUE; break; - } + } } n = gaim_blist_node_next(n, FALSE); } @@ -4257,6 +4257,9 @@ if(!gtkblist || !node) return; + if (node->ui_data == NULL) + gaim_gtk_blist_new_node(node); + switch(node->type) { case GAIM_BLIST_GROUP_NODE: gaim_gtk_blist_update_group(list, node);