From: Philip Withnall Date: Wed, 25 Aug 2010 11:50:41 +0000 (+0100) Subject: Don't expand rows if the tree view has been destroyed X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=c9815085eed66cf02ab8dfb40fbf0aab393ccd4d Don't expand rows if the tree view has been destroyed --- diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c index 9a7e5215..6767c3bf 100644 --- a/libempathy-gtk/empathy-individual-view.c +++ b/libempathy-gtk/empathy-individual-view.c @@ -455,7 +455,12 @@ individual_view_drag_data_received (GtkWidget *view, static gboolean individual_view_drag_motion_cb (DragMotionData *data) { - gtk_tree_view_expand_row (GTK_TREE_VIEW (data->view), data->path, FALSE); + if (data->view != NULL) + { + gtk_tree_view_expand_row (GTK_TREE_VIEW (data->view), data->path, FALSE); + g_object_remove_weak_pointer (G_OBJECT (data->view), + (gpointer *) &data->view); + } data->timeout_id = 0; @@ -609,6 +614,7 @@ individual_view_drag_motion (GtkWidget *widget, dm = g_new0 (DragMotionData, 1); dm->view = EMPATHY_INDIVIDUAL_VIEW (widget); + g_object_add_weak_pointer (G_OBJECT (widget), (gpointer *) &dm->view); dm->path = gtk_tree_path_copy (path); dm->timeout_id = g_timeout_add_seconds (1,