[empathy] Do not crash if the row gets deleted before the expand idle cb
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Do not crash if the row gets deleted before the expand idle cb
- Date: Sun, 13 Jun 2010 10:03:30 +0000 (UTC)
commit 492a5fc0e466526f991e30f82fe7a42c22b4ec64
Author: Xavier Claessens <xclaesse gmail com>
Date: Sun Jun 13 11:56:06 2010 +0200
Do not crash if the row gets deleted before the expand idle cb
libempathy-gtk/empathy-contact-list-view.c | 4 ++++
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 a0e8902..184b3e8 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]