summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Kasik <mkasik@redhat.com>2014-03-04 15:17:23 +0100
committerBenjamin Otte <otte@redhat.com>2014-03-05 21:03:36 +0100
commit158cb29e55d8de5133d1583d436e0697931692f0 (patch)
tree1f32c4ba1ed7640a7924f4851cb29ac403eceea7
parent01fe1282fc71ae4ef65e9c4a70ce8224e09de7fa (diff)
downloadgtk+-158cb29e55d8de5133d1583d436e0697931692f0.tar.gz
GtkIconViewAccessible: Don't access freed item
Don't get index from deleted GtkIconViewItem. Remove the item before traversing list of items. https://bugzilla.gnome.org/show_bug.cgi?id=701884
-rw-r--r--gtk/a11y/gtkiconviewaccessible.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/a11y/gtkiconviewaccessible.c b/gtk/a11y/gtkiconviewaccessible.c
index 2673b19bd8..82c50f931d 100644
--- a/gtk/a11y/gtkiconviewaccessible.c
+++ b/gtk/a11y/gtkiconviewaccessible.c
@@ -1128,7 +1128,7 @@ gtk_icon_view_accessible_model_row_deleted (GtkTreeModel *tree_model,
{
deleted_item = items;
}
- if (info->index != item->item->index)
+ else if (info->index != item->item->index)
{
if (tmp_list == NULL)
tmp_list = items;
@@ -1138,7 +1138,6 @@ gtk_icon_view_accessible_model_row_deleted (GtkTreeModel *tree_model,
items = items->next;
}
- gtk_icon_view_accessible_traverse_items (view, tmp_list);
if (deleted_item)
{
info = deleted_item->data;
@@ -1149,6 +1148,7 @@ gtk_icon_view_accessible_model_row_deleted (GtkTreeModel *tree_model,
g_object_unref (info->item);
g_free (info);
}
+ gtk_icon_view_accessible_traverse_items (view, tmp_list);
return;
}