[empathy] Don't expand rows if the tree view has been destroyed
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Don't expand rows if the tree view has been destroyed
- Date: Wed, 25 Aug 2010 14:30:47 +0000 (UTC)
commit c9815085eed66cf02ab8dfb40fbf0aab393ccd4d
Author: Philip Withnall <philip withnall collabora co uk>
Date: Wed Aug 25 12:50:41 2010 +0100
Don't expand rows if the tree view has been destroyed
libempathy-gtk/empathy-individual-view.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 9a7e521..6767c3b 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]