aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/message-list.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index b781937a0d..4db84b06ba 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-30 Li Yuan <li.yuan@sun.com>
+
+ Fix for #341381.
+ * message-list.c: (message_list_set_folder):
+ We should lock e-tree-memory when we change it.
+
2006-05-30 Srinivasa Ragavan <sragavan@novell.com>
** Fixes bug #332936
diff --git a/mail/message-list.c b/mail/message-list.c
index cef1a77e80..999fef410c 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -2827,6 +2827,7 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
void
message_list_set_folder (MessageList *message_list, CamelFolder *folder, const char *uri, gboolean outgoing)
{
+ ETreeModel *etm = message_list->model;
gboolean hide_deleted;
GConfClient *gconf;
CamelException ex;
@@ -2854,7 +2855,9 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c
save_hide_state (message_list);
}
+ e_tree_memory_freeze(E_TREE_MEMORY(etm));
clear_tree (message_list);
+ e_tree_memory_thaw(E_TREE_MEMORY(etm));
if (message_list->folder) {
camel_object_unhook_event((CamelObject *)message_list->folder, "folder_changed",