comparison gtk/gtkblist.c @ 15244:ebe19ec7c78c

[gaim-migrate @ 18034] This patch fixes startup crashes when the blist is manipulated before the Gtk blist is created. Thanks to Geoffrey Antos. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Thu, 21 Dec 2006 00:40:21 +0000
parents ea246204cf36
children d5e7690a9b06
comparison
equal deleted inserted replaced
15243:859250fbf8a5 15244:ebe19ec7c78c
4369 gaim_signal_emit(handle, "gtkblist-created", list); 4369 gaim_signal_emit(handle, "gtkblist-created", list);
4370 } 4370 }
4371 4371
4372 static void redo_buddy_list(GaimBuddyList *list, gboolean remove, gboolean rerender) 4372 static void redo_buddy_list(GaimBuddyList *list, gboolean remove, gboolean rerender)
4373 { 4373 {
4374 gtkblist = GAIM_GTK_BLIST(list);
4375 if(!gtkblist || !gtkblist->treeview)
4376 return;
4377
4374 GaimBlistNode *node = list->root; 4378 GaimBlistNode *node = list->root;
4375 4379
4376 while (node) 4380 while (node)
4377 { 4381 {
4378 /* This is only needed when we're reverting to a non-GTK+ sorted 4382 /* This is only needed when we're reverting to a non-GTK+ sorted
4861 4865
4862 static void gaim_gtk_blist_update(GaimBuddyList *list, GaimBlistNode *node) 4866 static void gaim_gtk_blist_update(GaimBuddyList *list, GaimBlistNode *node)
4863 { 4867 {
4864 if (list) 4868 if (list)
4865 gtkblist = GAIM_GTK_BLIST(list); 4869 gtkblist = GAIM_GTK_BLIST(list);
4866 if(!gtkblist || !node) 4870 if(!gtkblist || !gtkblist->treeview || !node)
4867 return; 4871 return;
4868 4872
4869 if (node->ui_data == NULL) 4873 if (node->ui_data == NULL)
4870 gaim_gtk_blist_new_node(node); 4874 gaim_gtk_blist_new_node(node);
4871 4875