Mercurial > pidgin
comparison console/gntblist.c @ 14984:fb98e9c45607
[gaim-migrate @ 17763]
Fix a crash, plug a leak.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 17 Nov 2006 02:15:28 +0000 |
parents | e601bc7880a6 |
children | ab2847049049 |
comparison
equal
deleted
inserted
replaced
14983:8186cb621d2b | 14984:fb98e9c45607 |
---|---|
1004 | 1004 |
1005 static void | 1005 static void |
1006 gg_blist_toggle_tag_buddy(GaimBlistNode *node) | 1006 gg_blist_toggle_tag_buddy(GaimBlistNode *node) |
1007 { | 1007 { |
1008 GList *iter; | 1008 GList *iter; |
1009 if (GAIM_BLIST_NODE_IS_CHAT(node) || GAIM_BLIST_NODE_IS_GROUP(node)) | |
1010 return; | |
1009 if (ggblist->tagged && (iter = g_list_find(ggblist->tagged, node)) != NULL) { | 1011 if (ggblist->tagged && (iter = g_list_find(ggblist->tagged, node)) != NULL) { |
1010 ggblist->tagged = g_list_delete_link(ggblist->tagged, iter); | 1012 ggblist->tagged = g_list_delete_link(ggblist->tagged, iter); |
1011 } else { | 1013 } else { |
1012 ggblist->tagged = g_list_prepend(ggblist->tagged, node); | 1014 ggblist->tagged = g_list_prepend(ggblist->tagged, node); |
1013 } | 1015 } |
1442 } | 1444 } |
1443 | 1445 |
1444 if (ggblist->typing) | 1446 if (ggblist->typing) |
1445 g_source_remove(ggblist->typing); | 1447 g_source_remove(ggblist->typing); |
1446 remove_peripherals(ggblist); | 1448 remove_peripherals(ggblist); |
1449 if (ggblist->tagged) | |
1450 g_list_free(ggblist->tagged); | |
1447 g_free(ggblist); | 1451 g_free(ggblist); |
1448 ggblist = NULL; | 1452 ggblist = NULL; |
1449 } | 1453 } |
1450 | 1454 |
1451 static void | 1455 static void |