diff options
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-attachment-store.c | 9 |
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)); |