X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=src%2Fprocmsg.c;h=85c889e19812a8d5f6c46bc04c029405e3ed74af;hp=1069639027265fb44a6c11ca62a6f32d4414dcd7;hb=f409db7051a26c30cf7e49faa96ab97685963207;hpb=a8576b6fe029dd59075b7abda7e8ae949d2cbab1 diff --git a/src/procmsg.c b/src/procmsg.c index 106963902..85c889e19 100644 --- a/src/procmsg.c +++ b/src/procmsg.c @@ -251,8 +251,11 @@ GNode *procmsg_get_thread_tree(GSList *mlist) START_TIMING("procmsg_get_thread_tree"); root = g_node_new(NULL); msgid_table = g_hash_table_new(g_str_hash, g_str_equal); - subject_relation = g_relation_new(2); - g_relation_index(subject_relation, 0, g_str_hash, g_str_equal); + + if (prefs_common.thread_by_subject) { + subject_relation = g_relation_new(2); + g_relation_index(subject_relation, 0, g_str_hash, g_str_equal); + } for (; mlist != NULL; mlist = mlist->next) { msginfo = (MsgInfo *)mlist->data; @@ -334,7 +337,9 @@ GNode *procmsg_get_thread_tree(GSList *mlist) END_TIMING(); } - g_relation_destroy(subject_relation); + if (prefs_common.thread_by_subject) + g_relation_destroy(subject_relation); + g_hash_table_destroy(msgid_table); END_TIMING(); return root;