diff options
Diffstat (limited to 'mail/message-list.c')
-rw-r--r-- | mail/message-list.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/mail/message-list.c b/mail/message-list.c index e4d5bee062..08d46ef93e 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -30,6 +30,8 @@ #include "art/tree-expanded.xpm" #include "art/tree-unexpanded.xpm" +#define d(x) x + /* * Default sizes for the ETable display * @@ -87,12 +89,23 @@ get_message_info (MessageList *message_list, int row) ETreePath *node; char *uid; - if (row >= g_hash_table_size (message_list->uid_rowmap)) + d(printf ("\t*** row = %d ***\n", row)); +#if 0 + /* FIXME: The reason this is commented out is because this is not a good + safety check. Let me explain: Since we can have more rows than actual messages, + the condition row >= [size] could fail beyond a certain point in the message + list. We need a way to account for the "No item in this view" rows */ + if (row >= g_hash_table_size (message_list->uid_rowmap)) { + d(printf ("\t*** max row = %d ***\n", g_hash_table_size (message_list->uid_rowmap))); return NULL; + } +#endif node = e_tree_model_node_at_row (model, row); + d(printf ("\t*** node = %p ***\n", node)); g_return_val_if_fail (node != NULL, NULL); uid = e_tree_model_node_get_data (model, node); + d(printf ("\t*** uid = %s ***\n", uid)); g_return_val_if_fail (uid != NULL, NULL); return camel_folder_get_message_info (message_list->folder, uid); |