diff options
Diffstat (limited to 'gtk/gtkcombobox.c')
-rw-r--r-- | gtk/gtkcombobox.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 2534ac84e..eb1918c40 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -2258,7 +2258,6 @@ gtk_combo_box_cell_layout_clear_attributes (GtkCellLayout *layout, ComboCellInfo *info; GtkComboBox *combo_box = GTK_COMBO_BOX (layout); GtkWidget *menu; - GSList *list; g_return_if_fail (GTK_IS_COMBO_BOX (layout)); g_return_if_fail (GTK_IS_CELL_RENDERER (cell)); @@ -2266,14 +2265,8 @@ gtk_combo_box_cell_layout_clear_attributes (GtkCellLayout *layout, info = gtk_combo_box_get_cell_info (combo_box, cell); g_return_if_fail (info != NULL); - list = info->attributes; - while (list && list->next) - { - g_free (list->data); - list = list->next->next; - } - g_slist_free (list); - + g_slist_foreach (info->attributes, (GFunc)g_free, NULL); + g_slist_free (info->attributes); info->attributes = NULL; if (combo_box->priv->cell_view) |