[evolution/kill-bonobo] Bug 582585 – Crash when deleting multiple attachments from composed mail
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution/kill-bonobo] Bug 582585 – Crash when deleting multiple attachments from composed mail
- Date: Wed, 20 May 2009 23:04:19 -0400 (EDT)
commit 63b66d68529f434d16a12da81a5c611e0df1e7ee
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu May 14 10:50:38 2009 -0400
Bug 582585 â?? Crash when deleting multiple attachments from composed mail
---
widgets/misc/e-attachment-view.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/widgets/misc/e-attachment-view.c b/widgets/misc/e-attachment-view.c
index 27ef5d8..48292cf 100644
--- a/widgets/misc/e-attachment-view.c
+++ b/widgets/misc/e-attachment-view.c
@@ -1038,6 +1038,12 @@ e_attachment_view_remove_selected (EAttachmentView *view,
store = e_attachment_view_get_store (view);
model = GTK_TREE_MODEL (store);
+ /* Remove attachments in reverse order to avoid invalidating
+ * tree paths as we iterate over the list. Note, the list is
+ * probably already sorted but we sort again just to be safe. */
+ selected = g_list_reverse (g_list_sort (
+ selected, (GCompareFunc) gtk_tree_path_compare));
+
for (item = selected; item != NULL; item = item->next) {
EAttachment *attachment;
GtkTreePath *path = item->data;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]