comparison console/gntblist.c @ 15316:28051164843c

[gaim-migrate @ 18106] Do not crash trying to tag/attach NULL nodes. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 11 Jan 2007 07:42:51 +0000
parents f495e3063701
children 704d40050800
comparison
equal deleted inserted replaced
15315:4a4e1dfd8716 15316:28051164843c
1000 1000
1001 static void 1001 static void
1002 gg_blist_toggle_tag_buddy(GaimBlistNode *node) 1002 gg_blist_toggle_tag_buddy(GaimBlistNode *node)
1003 { 1003 {
1004 GList *iter; 1004 GList *iter;
1005 if (node == NULL)
1006 return;
1005 if (GAIM_BLIST_NODE_IS_CHAT(node) || GAIM_BLIST_NODE_IS_GROUP(node)) 1007 if (GAIM_BLIST_NODE_IS_CHAT(node) || GAIM_BLIST_NODE_IS_GROUP(node))
1006 return; 1008 return;
1007 if (ggblist->tagged && (iter = g_list_find(ggblist->tagged, node)) != NULL) { 1009 if (ggblist->tagged && (iter = g_list_find(ggblist->tagged, node)) != NULL) {
1008 ggblist->tagged = g_list_delete_link(ggblist->tagged, iter); 1010 ggblist->tagged = g_list_delete_link(ggblist->tagged, iter);
1009 } else { 1011 } else {
1017 static void 1019 static void
1018 gg_blist_place_tagged(GaimBlistNode *target) 1020 gg_blist_place_tagged(GaimBlistNode *target)
1019 { 1021 {
1020 GaimGroup *tg = NULL; 1022 GaimGroup *tg = NULL;
1021 GaimContact *tc = NULL; 1023 GaimContact *tc = NULL;
1024
1025 if (target == NULL)
1026 return;
1022 1027
1023 /* This target resolution probably needs more clarification; for 1028 /* This target resolution probably needs more clarification; for
1024 * example, if I tag a buddy in a contact, then place on 1029 * example, if I tag a buddy in a contact, then place on
1025 * another buddy in the same contact, I probably intend to 1030 * another buddy in the same contact, I probably intend to
1026 * place the tagged buddy immediately after (before?) the 1031 * place the tagged buddy immediately after (before?) the