aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-10-29 20:01:19 +0800
committerMilan Crha <mcrha@redhat.com>2010-10-29 20:01:19 +0800
commite101e63be94da933fe799f0afd754697fcf6173f (patch)
treee27674ab6e68eddb1a75a48ecab03f6913504110
parentc7d7f8867138261f251e66ade0661f5aa22ab7d7 (diff)
downloadgsoc2013-evolution-e101e63be94da933fe799f0afd754697fcf6173f.tar
gsoc2013-evolution-e101e63be94da933fe799f0afd754697fcf6173f.tar.gz
gsoc2013-evolution-e101e63be94da933fe799f0afd754697fcf6173f.tar.bz2
gsoc2013-evolution-e101e63be94da933fe799f0afd754697fcf6173f.tar.lz
gsoc2013-evolution-e101e63be94da933fe799f0afd754697fcf6173f.tar.xz
gsoc2013-evolution-e101e63be94da933fe799f0afd754697fcf6173f.tar.zst
gsoc2013-evolution-e101e63be94da933fe799f0afd754697fcf6173f.zip
More detailed runtime warning on message list pre-sorting
-rw-r--r--mail/message-list.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index 68e05fc998..fc1d6896a6 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);