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
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