fix a segfault in the a11y code

svn path=/trunk/; revision=20813
This commit is contained in:
Matthias Clasen 2008-07-10 16:37:53 +00:00
parent 804a06b859
commit 418a348bef
2 changed files with 11 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2008-07-10 Matthias Clasen <mclasen@redhat.com>
Bug 542234 iconview a11y implementation segfaults
* gtk/gtkiconview.c: Fix a segfault in the a11y code.
Patch by Li Yuan.
2008-07-08 Christian Neumair <cneumair@gnome.org> 2008-07-08 Christian Neumair <cneumair@gnome.org>
* gtk/gtkuimanager.c (update_node): * gtk/gtkuimanager.c (update_node):

View File

@ -8970,8 +8970,8 @@ gtk_icon_view_accessible_model_row_deleted (GtkTreeModel *tree_model,
{ {
if (tmp_list == NULL) if (tmp_list == NULL)
tmp_list = items; tmp_list = items;
else
info->index = item->item->index; info->index = item->item->index;
} }
items = items->next; items = items->next;
@ -8981,11 +8981,8 @@ gtk_icon_view_accessible_model_row_deleted (GtkTreeModel *tree_model,
{ {
info = deleted_item->data; info = deleted_item->data;
gtk_icon_view_item_accessible_add_state (GTK_ICON_VIEW_ITEM_ACCESSIBLE (info->item), ATK_STATE_DEFUNCT, TRUE); gtk_icon_view_item_accessible_add_state (GTK_ICON_VIEW_ITEM_ACCESSIBLE (info->item), ATK_STATE_DEFUNCT, TRUE);
} g_signal_emit_by_name (atk_obj, "children_changed::remove",
g_signal_emit_by_name (atk_obj, "children_changed::remove", index, NULL, NULL);
index, NULL, NULL);
if (deleted_item)
{
priv->items = g_list_remove_link (priv->items, deleted_item); priv->items = g_list_remove_link (priv->items, deleted_item);
g_free (info); g_free (info);
} }