[evolution] More detailed runtime warning on message list pre-sorting
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] More detailed runtime warning on message list pre-sorting
- Date: Fri, 29 Oct 2010 12:02:22 +0000 (UTC)
commit e101e63be94da933fe799f0afd754697fcf6173f
Author: Milan Crha <mcrha redhat com>
Date: Fri Oct 29 14:01:19 2010 +0200
More detailed runtime warning on message list pre-sorting
mail/message-list.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/mail/message-list.c b/mail/message-list.c
index 68e05fc..fc1d689 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -4401,10 +4401,18 @@ ml_sort_uids_by_tree (MessageList *ml, GPtrArray *uids)
for (i = 0; i < uids->len; i++) {
gchar *uid;
- struct sort_message_info_data *md = g_new0 (struct sort_message_info_data, 1);
+ CamelMessageInfo *mi;
+ struct sort_message_info_data *md;
uid = g_ptr_array_index (uids, i);
- md->mi = camel_folder_get_message_info (ml->folder, uid);
+ mi = camel_folder_get_message_info (ml->folder, uid);
+ if (!mi) {
+ g_warning ("%s: Cannot find uid '%s' in folder '%s'", G_STRFUNC, uid, camel_folder_get_full_name (ml->folder));
+ continue;
+ }
+
+ md = g_new0 (struct sort_message_info_data, 1);
+ md->mi = mi;
md->values = g_ptr_array_sized_new (len);
g_hash_table_insert (sort_data.message_infos, uid, md);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]