Mon, 31 Oct 2005 02:35:10 +0000
[gaim-migrate @ 14206]
fix the stupid crash
| src/gtkblist.c | file | annotate | diff | comparison | revisions |
--- a/src/gtkblist.c Mon Oct 31 02:19:51 2005 +0000 +++ b/src/gtkblist.c Mon Oct 31 02:35:10 2005 +0000 @@ -3524,11 +3524,13 @@ * contacts, the dragged buddy mysteriously 'disappears'. Stu. */ /* I think it's fixed now. Stu. */ - if(gtknode->recent_signonoff_timer > 0) - gaim_timeout_remove(gtknode->recent_signonoff_timer); - - g_free(node->ui_data); - node->ui_data = NULL; + if(gtknode) { + if(gtknode->recent_signonoff_timer > 0) + gaim_timeout_remove(gtknode->recent_signonoff_timer); + + g_free(node->ui_data); + node->ui_data = NULL; + } } static gboolean do_selection_changed(GaimBlistNode *new_selection) @@ -4626,7 +4628,13 @@ static void buddy_signonoff_cb(GaimBuddy *buddy) { - struct _gaim_gtk_blist_node *gtknode = ((GaimBlistNode*)buddy)->ui_data; + struct _gaim_gtk_blist_node *gtknode; + + if(!((GaimBlistNode*)buddy)->ui_data) { + gaim_gtk_blist_new_node((GaimBlistNode*)buddy); + } + + gtknode = ((GaimBlistNode*)buddy)->ui_data; gtknode->recent_signonoff = TRUE;