[gtk+/gtk-3-10] GtkIconViewAccessible: Don't access freed item
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-10] GtkIconViewAccessible: Don't access freed item
- Date: Sun, 6 Apr 2014 03:42:57 +0000 (UTC)
commit d60a903407ada24b8712d1769ddfd2c6a892f284
Author: Marek Kasik <mkasik redhat com>
Date: Tue Mar 4 15:17:23 2014 +0100
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
gtk/a11y/gtkiconviewaccessible.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/a11y/gtkiconviewaccessible.c b/gtk/a11y/gtkiconviewaccessible.c
index ce78c22..0b5a6c0 100644
--- a/gtk/a11y/gtkiconviewaccessible.c
+++ b/gtk/a11y/gtkiconviewaccessible.c
@@ -1126,7 +1126,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;
@@ -1136,7 +1136,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;
@@ -1147,6 +1146,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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]