# HG changeset patch # User Sadrul Habib Chowdhury # Date 1160614927 0 # Node ID ef94c6b853ab423daa7dc2a43d91bad4a814f172 # Parent bc2b2f9a1a1baa2a3d3e0ea91fed36b996945d1b [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 diff -r bc2b2f9a1a1b -r ef94c6b853ab console/gntblist.c --- a/console/gntblist.c Wed Oct 11 08:58:59 2006 +0000 +++ b/console/gntblist.c Thu Oct 12 01:02:07 2006 +0000 @@ -206,6 +206,8 @@ if ((!gaim_prefs_get_bool(PREF_ROOT "/showoffline") && !is_contact_online(contact)) || contact->currentsize < 1) node_remove(gaim_get_blist(), node); + else + add_node(node, list->ui_data); } else if (GAIM_BLIST_NODE_IS_GROUP(node)) { GaimGroup *group = (GaimGroup*)node; if ((!gaim_prefs_get_bool(PREF_ROOT "/showoffline") && !is_group_online(group)) || @@ -526,6 +528,8 @@ return; contact = (GaimContact*)node->parent; + if (!contact) /* When a new buddy is added and show-offline is set */ + return; add_node((GaimBlistNode*)contact, ggblist); node->ui_data = gnt_tree_add_row_after(GNT_TREE(ggblist->tree), buddy,