aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-03 23:09:55 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-03 23:12:56 +0800
commitd25442bccc9b9d143fe92f2506f6d84499ece829 (patch)
tree0f89a7900979a4219d674411772a7089c61c5dd9
parent979f90a0425dec607d58008fc8ba8a5966179807 (diff)
downloadgsoc2013-empathy-d25442bccc9b9d143fe92f2506f6d84499ece829.tar
gsoc2013-empathy-d25442bccc9b9d143fe92f2506f6d84499ece829.tar.gz
gsoc2013-empathy-d25442bccc9b9d143fe92f2506f6d84499ece829.tar.bz2
gsoc2013-empathy-d25442bccc9b9d143fe92f2506f6d84499ece829.tar.lz
gsoc2013-empathy-d25442bccc9b9d143fe92f2506f6d84499ece829.tar.xz
gsoc2013-empathy-d25442bccc9b9d143fe92f2506f6d84499ece829.tar.zst
gsoc2013-empathy-d25442bccc9b9d143fe92f2506f6d84499ece829.zip
roster-view: clear_view: start by cleaning our internal hash tables
Removing and destroying the widgets contained in the view will call empathy_roster_view_remove(). This function may use some of the internal hash tables which now contain destroyed object. It's safer to clean the internal hash tables first as we are about to destroy their content anyway. https://bugzilla.gnome.org/show_bug.cgi?id=683275
-rw-r--r--libempathy-gtk/empathy-roster-view.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c
index 205b11a66..557728527 100644
--- a/libempathy-gtk/empathy-roster-view.c
+++ b/libempathy-gtk/empathy-roster-view.c
@@ -1337,12 +1337,12 @@ empathy_roster_view_show_offline (EmpathyRosterView *self,
static void
clear_view (EmpathyRosterView *self)
{
- gtk_container_foreach (GTK_CONTAINER (self),
- (GtkCallback) gtk_widget_destroy, NULL);
-
g_hash_table_remove_all (self->priv->roster_contacts);
g_hash_table_remove_all (self->priv->roster_groups);
g_hash_table_remove_all (self->priv->displayed_contacts);
+
+ gtk_container_foreach (GTK_CONTAINER (self),
+ (GtkCallback) gtk_widget_destroy, NULL);
}
void