aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-04-19 04:55:38 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-04-19 04:55:38 +0800
commitd4473cf20a4991400f1ccbaecab8f8a82198a9a8 (patch)
treef8ca419072b71ee41b89f88427f4f7620e6eae95 /e-util
parentfd6ff38fbd6dc82fe16c157dbdb4602b3277abfa (diff)
downloadgsoc2013-evolution-d4473cf20a4991400f1ccbaecab8f8a82198a9a8.tar
gsoc2013-evolution-d4473cf20a4991400f1ccbaecab8f8a82198a9a8.tar.gz
gsoc2013-evolution-d4473cf20a4991400f1ccbaecab8f8a82198a9a8.tar.bz2
gsoc2013-evolution-d4473cf20a4991400f1ccbaecab8f8a82198a9a8.tar.lz
gsoc2013-evolution-d4473cf20a4991400f1ccbaecab8f8a82198a9a8.tar.xz
gsoc2013-evolution-d4473cf20a4991400f1ccbaecab8f8a82198a9a8.tar.zst
gsoc2013-evolution-d4473cf20a4991400f1ccbaecab8f8a82198a9a8.zip
Bug 698042 - Crash when sending e-mail with attachment
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-attachment-store.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/e-util/e-attachment-store.c b/e-util/e-attachment-store.c
index f434f5e81c..16f38fb5e5 100644
--- a/e-util/e-attachment-store.c
+++ b/e-util/e-attachment-store.c
@@ -281,6 +281,13 @@ e_attachment_store_remove_all (EAttachmentStore *store)
if (!g_hash_table_size (store->priv->attachment_index))
return;
+ /* Clear the list store before cancelling EAttachment load/save
+ * operations. This will invalidate the EAttachment's tree row
+ * reference so it won't try to update the row's icon column in
+ * response to the cancellation. That can create problems when
+ * the list store is being disposed. */
+ gtk_list_store_clear (GTK_LIST_STORE (store));
+
g_object_freeze_notify (G_OBJECT (store));
list = e_attachment_store_get_attachments (store);
@@ -294,8 +301,6 @@ e_attachment_store_remove_all (EAttachmentStore *store)
g_list_foreach (list, (GFunc) g_object_unref, NULL);
g_list_free (list);
- gtk_list_store_clear (GTK_LIST_STORE (store));
-
g_object_notify (G_OBJECT (store), "num-attachments");
g_object_notify (G_OBJECT (store), "total-size");
g_object_thaw_notify (G_OBJECT (store));