diff options
author | Matthias Clasen <mclasen@redhat.com> | 2004-10-01 18:56:14 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-10-01 18:56:14 +0000 |
commit | 03646f37b11f5ac899be01f1c5bf3ab96b13d5dd (patch) | |
tree | fd8254421189c097142279e902e0ccdf8eac2b7b /gtk/gtkcellview.c | |
parent | c1bdbb3eed63b0b3a7e6fd7e87a56ce0a228035b (diff) | |
download | gdk-pixbuf-03646f37b11f5ac899be01f1c5bf3ab96b13d5dd.tar.gz |
Silently ignore info being NULL. This is unavoidable with the current
2004-10-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcellview.c (gtk_cell_view_cell_layout_clear_attributes):
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_clear_attributes):
Silently ignore info being NULL. This is unavoidable with the
current design where we have every implementation of layout_clear
call layout_clear_attributes, and also delegate calls to dependent
cell layouts. (#154191, Martyn Russell)
Diffstat (limited to 'gtk/gtkcellview.c')
-rw-r--r-- | gtk/gtkcellview.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c index a68d03482..84c3bc8dd 100644 --- a/gtk/gtkcellview.c +++ b/gtk/gtkcellview.c @@ -706,17 +706,18 @@ gtk_cell_view_cell_layout_clear_attributes (GtkCellLayout *layout, g_return_if_fail (GTK_IS_CELL_RENDERER (renderer)); info = gtk_cell_view_get_cell_info (cellview, renderer); - g_return_if_fail (info != NULL); - - list = info->attributes; - while (list && list->next) + if (info != NULL) { - g_free (list->data); - list = list->next->next; + list = info->attributes; + while (list && list->next) + { + g_free (list->data); + list = list->next->next; + } + + g_slist_free (info->attributes); + info->attributes = NULL; } - - g_slist_free (info->attributes); - info->attributes = NULL; } static void |