aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2010-06-13 17:56:06 +0800
committerXavier Claessens <xclaesse@gmail.com>2010-06-13 18:03:24 +0800
commit492a5fc0e466526f991e30f82fe7a42c22b4ec64 (patch)
treef95a81b32c2c1c7a452ece5339e13fbc3ec2663a
parent17f8244abe8a5456512f860a7132d3b56613891a (diff)
downloadgsoc2013-empathy-492a5fc0e466526f991e30f82fe7a42c22b4ec64.tar
gsoc2013-empathy-492a5fc0e466526f991e30f82fe7a42c22b4ec64.tar.gz
gsoc2013-empathy-492a5fc0e466526f991e30f82fe7a42c22b4ec64.tar.bz2
gsoc2013-empathy-492a5fc0e466526f991e30f82fe7a42c22b4ec64.tar.lz
gsoc2013-empathy-492a5fc0e466526f991e30f82fe7a42c22b4ec64.tar.xz
gsoc2013-empathy-492a5fc0e466526f991e30f82fe7a42c22b4ec64.tar.zst
gsoc2013-empathy-492a5fc0e466526f991e30f82fe7a42c22b4ec64.zip
Do not crash if the row gets deleted before the expand idle cb
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index a0e890282..184b3e877 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -1309,6 +1309,9 @@ contact_list_view_expand_idle_cb (gpointer user_data)
GINT_TO_POINTER (data->expand));
path = gtk_tree_row_reference_get_path (data->row_ref);
+ if (path == NULL)
+ goto done;
+
if (data->expand) {
gtk_tree_view_expand_row (GTK_TREE_VIEW (data->view), path,
TRUE);
@@ -1321,6 +1324,7 @@ contact_list_view_expand_idle_cb (gpointer user_data)
contact_list_view_row_expand_or_collapse_cb,
GINT_TO_POINTER (data->expand));
+done:
g_object_unref (data->view);
gtk_tree_row_reference_free (data->row_ref);
g_slice_free (ExpandData, data);