Mercurial > pidgin
comparison console/gntblist.c @ 14708:ef94c6b853ab
[gaim-migrate @ 17462]
Patch #1574229 from Richard Nelson (wabz) to fix a crash when adding a buddy
and show-offline is set to true.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 12 Oct 2006 01:02:07 +0000 |
parents | 8538993dbb00 |
children | b15c2eaeb67f |
comparison
equal
deleted
inserted
replaced
14707:bc2b2f9a1a1b | 14708:ef94c6b853ab |
---|---|
204 } else if (GAIM_BLIST_NODE_IS_CONTACT(node)) { | 204 } else if (GAIM_BLIST_NODE_IS_CONTACT(node)) { |
205 GaimContact *contact = (GaimContact*)node; | 205 GaimContact *contact = (GaimContact*)node; |
206 if ((!gaim_prefs_get_bool(PREF_ROOT "/showoffline") && !is_contact_online(contact)) || | 206 if ((!gaim_prefs_get_bool(PREF_ROOT "/showoffline") && !is_contact_online(contact)) || |
207 contact->currentsize < 1) | 207 contact->currentsize < 1) |
208 node_remove(gaim_get_blist(), node); | 208 node_remove(gaim_get_blist(), node); |
209 else | |
210 add_node(node, list->ui_data); | |
209 } else if (GAIM_BLIST_NODE_IS_GROUP(node)) { | 211 } else if (GAIM_BLIST_NODE_IS_GROUP(node)) { |
210 GaimGroup *group = (GaimGroup*)node; | 212 GaimGroup *group = (GaimGroup*)node; |
211 if ((!gaim_prefs_get_bool(PREF_ROOT "/showoffline") && !is_group_online(group)) || | 213 if ((!gaim_prefs_get_bool(PREF_ROOT "/showoffline") && !is_group_online(group)) || |
212 group->currentsize < 1) | 214 group->currentsize < 1) |
213 node_remove(list, node); | 215 node_remove(list, node); |
524 GaimBlistNode *node = (GaimBlistNode *)buddy; | 526 GaimBlistNode *node = (GaimBlistNode *)buddy; |
525 if (node->ui_data) | 527 if (node->ui_data) |
526 return; | 528 return; |
527 | 529 |
528 contact = (GaimContact*)node->parent; | 530 contact = (GaimContact*)node->parent; |
531 if (!contact) /* When a new buddy is added and show-offline is set */ | |
532 return; | |
529 add_node((GaimBlistNode*)contact, ggblist); | 533 add_node((GaimBlistNode*)contact, ggblist); |
530 | 534 |
531 node->ui_data = gnt_tree_add_row_after(GNT_TREE(ggblist->tree), buddy, | 535 node->ui_data = gnt_tree_add_row_after(GNT_TREE(ggblist->tree), buddy, |
532 gnt_tree_create_row(GNT_TREE(ggblist->tree), get_display_name(node)), | 536 gnt_tree_create_row(GNT_TREE(ggblist->tree), get_display_name(node)), |
533 contact, NULL); | 537 contact, NULL); |