changeset 5254:d1e1ca490894

[gaim-migrate @ 5626] (11:59:54) Robot101: found & fixed a crash at signoff... (12:17:48) faceprint|laptop: "if you can't figure out what this is, you shouldn't be using CVS" committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 28 Apr 2003 16:21:03 +0000
parents 2c9de5ae24a0
children c0baa01cdeda
files src/gtkblist.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkblist.c	Mon Apr 28 07:50:44 2003 +0000
+++ b/src/gtkblist.c	Mon Apr 28 16:21:03 2003 +0000
@@ -1552,9 +1552,11 @@
 
 static gboolean do_selection_changed(GaimBlistNode *new_selection)
 {
-	GaimBlistNode *old_selection = gtkblist->selected_node;
+	GaimBlistNode *old_selection = NULL;
 
-	if(new_selection != gtkblist->selected_node) {
+	/* test for gtkblist because crazy timeout means we can be called after the blist is gone */
+	if (gtkblist && new_selection != gtkblist->selected_node) {
+		old_selection = gtkblist->selected_node;
 		gtkblist->selected_node = new_selection;
 		if(new_selection)
 			gaim_gtk_blist_update(NULL, new_selection);
@@ -1574,6 +1576,7 @@
 		gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), &iter,
 				NODE_COLUMN, &new_selection, -1);
 	}
+
 	/* we set this up as a timeout, otherwise the blist flickers */
 	g_timeout_add(0, (GSourceFunc)do_selection_changed, new_selection);
 }