changeset 11915:31343023953c

[gaim-migrate @ 14206] fix the stupid crash committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 31 Oct 2005 02:35:10 +0000
parents 2219f4bf4a57
children af17c7940371
files src/gtkblist.c
diffstat 1 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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;