Mercurial > pidgin
changeset 19538:6575ec8e1a97
Do not try to update a buddy in the buddylist when there's no buddylist.
This fixes a crash EvilDennisR was getting.
I was totally doubting him until he proved I was completely wrong.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 29 Aug 2007 23:43:36 +0000 |
parents | 7d9887c3ac81 |
children | 4ce45c227f10 f77846f7d444 |
files | pidgin/gtkblist.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Wed Aug 29 20:28:35 2007 +0000 +++ b/pidgin/gtkblist.c Wed Aug 29 23:43:36 2007 +0000 @@ -125,7 +125,7 @@ static PidginBuddyList *gtkblist = NULL; static gboolean pidgin_blist_refresh_timer(PurpleBuddyList *list); -static void pidgin_blist_update_buddy(PurpleBuddyList *list, PurpleBlistNode *node, gboolean statusChange); +static void pidgin_blist_update_buddy(PurpleBuddyList *list, PurpleBlistNode *node, gboolean status_change); static void pidgin_blist_selection_changed(GtkTreeSelection *selection, gpointer data); static void pidgin_blist_update(PurpleBuddyList *list, PurpleBlistNode *node); static void pidgin_blist_update_group(PurpleBuddyList *list, PurpleBlistNode *node); @@ -614,6 +614,8 @@ static void pidgin_blist_update_privacy_cb(PurpleBuddy *buddy) { + if (buddy->node.ui_data == NULL || ((struct _pidgin_blist_node*)buddy->node.ui_data)->row == NULL) + return; pidgin_blist_update_buddy(purple_get_blist(), (PurpleBlistNode*)(buddy), TRUE); } @@ -5158,7 +5160,7 @@ -static void pidgin_blist_update_buddy(PurpleBuddyList *list, PurpleBlistNode *node, gboolean statusChange) +static void pidgin_blist_update_buddy(PurpleBuddyList *list, PurpleBlistNode *node, gboolean status_change) { PurpleBuddy *buddy; struct _pidgin_blist_node *gtkparentnode;