aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-individual-view.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-25 19:50:41 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-25 22:30:24 +0800
commitc9815085eed66cf02ab8dfb40fbf0aab393ccd4d (patch)
treeba9d4f5c5b86d4c8758198a087b026ae277f3895 /libempathy-gtk/empathy-individual-view.c
parente12b292643c831d8e35ddeca8aed4d24269cfe7f (diff)
downloadgsoc2013-empathy-c9815085eed66cf02ab8dfb40fbf0aab393ccd4d.tar
gsoc2013-empathy-c9815085eed66cf02ab8dfb40fbf0aab393ccd4d.tar.gz
gsoc2013-empathy-c9815085eed66cf02ab8dfb40fbf0aab393ccd4d.tar.bz2
gsoc2013-empathy-c9815085eed66cf02ab8dfb40fbf0aab393ccd4d.tar.lz
gsoc2013-empathy-c9815085eed66cf02ab8dfb40fbf0aab393ccd4d.tar.xz
gsoc2013-empathy-c9815085eed66cf02ab8dfb40fbf0aab393ccd4d.tar.zst
gsoc2013-empathy-c9815085eed66cf02ab8dfb40fbf0aab393ccd4d.zip
Don't expand rows if the tree view has been destroyed
Diffstat (limited to 'libempathy-gtk/empathy-individual-view.c')
-rw-r--r--libempathy-gtk/empathy-individual-view.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 9a7e5215e..6767c3bfd 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,