Mercurial > pidgin
changeset 14848:6d9db29f4c10
[gaim-migrate @ 17617]
Patch from Richard 'wabz' Nelson to fix a crash during startup if show-offline is enabled.
I also noticed another crash during shutdown. Fix that one too.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 29 Oct 2006 07:09:49 +0000 |
parents | d478f3853671 |
children | 7cf437793f16 |
files | console/gntblist.c |
diffstat | 1 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/console/gntblist.c Sun Oct 29 03:43:15 2006 +0000 +++ b/console/gntblist.c Sun Oct 29 07:09:49 2006 +0000 @@ -158,6 +158,13 @@ ggblist->tnode = NULL; } +static gboolean +_draw_tooltip(gpointer data) +{ + draw_tooltip(data); + return FALSE; +} + static void node_remove(GaimBuddyList *list, GaimBlistNode *node) { @@ -180,7 +187,13 @@ group->currentsize < 1) node_remove(list, node->parent); } - draw_tooltip(ggblist); + + /* When an account has signed off, it removes one buddy at a time. + * Drawing the tooltip after removing each buddy is expensive. On + * top of that, if the selected buddy belongs to the disconnected + * account, then retreiving the tooltip for that causes crash. So + * let's make sure we wait for all the buddies to be removed first.*/ + g_timeout_add(0, _draw_tooltip, ggblist); } static void @@ -1450,7 +1463,7 @@ redraw_blist(const char *name, GaimPrefType type, gconstpointer val, gpointer data) { GaimBlistNode *node, *sel; - if (ggblist == NULL) + if (ggblist == NULL || ggblist->window == NULL) return; sel = gnt_tree_get_selection_data(GNT_TREE(ggblist->tree));