diff options
author | Li Yuan <li.yuan@sun.com> | 2008-12-22 09:04:19 +0000 |
---|---|---|
committer | Li Yuan <liyuan@src.gnome.org> | 2008-12-22 09:04:19 +0000 |
commit | 405101d856ee64332c6c617404de51ceb8806e68 (patch) | |
tree | 24529e2bc33209315595fafeca3daa6a7d90a14d /gtk/gtkiconview.c | |
parent | bf84d781d7b64da105ba4df7680a16fb816a8f1f (diff) | |
download | gtk+-405101d856ee64332c6c617404de51ceb8806e68.tar.gz |
Bug #549251. No need to set name if there is no a11y item object.
2008-12-23 Li Yuan <li.yuan@sun.com>
* gtk/gtkiconview.c: (gtk_icon_view_accessible_model_row_changed):
Bug #549251. No need to set name if there is no a11y item object.
svn path=/trunk/; revision=21926
Diffstat (limited to 'gtk/gtkiconview.c')
-rw-r--r-- | gtk/gtkiconview.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 81ef0bded7..4afb10b383 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -8891,20 +8891,23 @@ gtk_icon_view_accessible_model_row_changed (GtkTreeModel *tree_model, index = gtk_tree_path_get_indices(path)[0]; a11y_item = gtk_icon_view_accessible_find_child (atk_obj, index); - widget = GTK_ACCESSIBLE (atk_obj)->widget; - icon_view = GTK_ICON_VIEW (widget); - item = a11y_item->item; + if (a11y_item) + { + widget = GTK_ACCESSIBLE (atk_obj)->widget; + icon_view = GTK_ICON_VIEW (widget); + item = a11y_item->item; - name = gtk_icon_view_item_accessible_get_name (ATK_OBJECT (a11y_item)); + name = gtk_icon_view_item_accessible_get_name (ATK_OBJECT (a11y_item)); - if (!name || strcmp (name, "") == 0) - { - gtk_icon_view_set_cell_data (icon_view, item); - text = get_text (icon_view, item); - if (text) + if (!name || strcmp (name, "") == 0) { - gtk_text_buffer_set_text (a11y_item->text_buffer, text, -1); - g_free (text); + gtk_icon_view_set_cell_data (icon_view, item); + text = get_text (icon_view, item); + if (text) + { + gtk_text_buffer_set_text (a11y_item->text_buffer, text, -1); + g_free (text); + } } } |