aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index d582c326f2..3b669b6b4d 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -5403,9 +5403,13 @@ message_list_regen_thread (GSimpleAsyncResult *simple,
thread_tree = message_list_ref_thread_tree (message_list);
- if (thread_tree != NULL)
+ if (thread_tree != NULL) {
+ /* Make sure multiple threads will not access the same
+ CamelFolderThread structure at the same time */
+ g_mutex_lock (&message_list->priv->thread_tree_lock);
camel_folder_thread_messages_apply (thread_tree, uids);
- else
+ g_mutex_unlock (&message_list->priv->thread_tree_lock);
+ } else
thread_tree = camel_folder_thread_messages_new (
folder, uids, regen_data->thread_subject);