From: <sa...@us...> - 2006-10-29 07:09:56
|
Revision: 17617 http://svn.sourceforge.net/gaim/?rev=17617&view=rev Author: sadrul Date: 2006-10-29 00:09:49 -0700 (Sun, 29 Oct 2006) Log Message: ----------- 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. Modified Paths: -------------- trunk/console/gntblist.c Modified: trunk/console/gntblist.c =================================================================== --- trunk/console/gntblist.c 2006-10-29 03:43:15 UTC (rev 17616) +++ trunk/console/gntblist.c 2006-10-29 07:09:49 UTC (rev 17617) @@ -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)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |