[evolution] Bug 698042 - Crash when sending e-mail with attachment



commit d4473cf20a4991400f1ccbaecab8f8a82198a9a8
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Apr 18 16:55:38 2013 -0400

    Bug 698042 - Crash when sending e-mail with attachment

 e-util/e-attachment-store.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-attachment-store.c b/e-util/e-attachment-store.c
index f434f5e..16f38fb 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));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]