aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-14 22:50:38 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-14 22:50:38 +0800
commitbbe6437d089381bb2a3008e98a03aebef53af0e6 (patch)
tree5e7f57cd5609958a64e0f837bb879804022752be /widgets
parentcdfa00701f45b3ada6bbec771ab4531b09a7b83d (diff)
downloadgsoc2013-evolution-bbe6437d089381bb2a3008e98a03aebef53af0e6.tar
gsoc2013-evolution-bbe6437d089381bb2a3008e98a03aebef53af0e6.tar.gz
gsoc2013-evolution-bbe6437d089381bb2a3008e98a03aebef53af0e6.tar.bz2
gsoc2013-evolution-bbe6437d089381bb2a3008e98a03aebef53af0e6.tar.lz
gsoc2013-evolution-bbe6437d089381bb2a3008e98a03aebef53af0e6.tar.xz
gsoc2013-evolution-bbe6437d089381bb2a3008e98a03aebef53af0e6.tar.zst
gsoc2013-evolution-bbe6437d089381bb2a3008e98a03aebef53af0e6.zip
Bug 582585 – Crash when deleting multiple attachments from composed mail
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/e-attachment-view.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/widgets/misc/e-attachment-view.c b/widgets/misc/e-attachment-view.c
index 27ef5d84a8..48292cfbc3 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;