diff options
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/message-list.c | 12 |
2 files changed, 15 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 589f2171bb..cd2a6d4739 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2008-07-03 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #541365 + + * message-list.c: (message_list_get_uids), (message_list_get_selected): + Do not call 'camel_folder_sort_uids' when we do not have folder or uid. + 2008-07-02 Jeffrey Stedfast <fejj@novell.com> Sort the uids so that moving/copying messages preserves mailbox diff --git a/mail/message-list.c b/mail/message-list.c index 756974c832..cdd9fad99d 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -3440,8 +3440,10 @@ message_list_get_uids(MessageList *ml) }; e_tree_path_foreach(ml->tree, ml_getselected_cb, &data); - camel_folder_sort_uids (ml->folder, data.uids); - + + if (ml->folder && data.uids->len) + camel_folder_sort_uids (ml->folder, data.uids); + return data.uids; } @@ -3454,8 +3456,10 @@ message_list_get_selected(MessageList *ml) }; e_tree_selected_path_foreach(ml->tree, ml_getselected_cb, &data); - camel_folder_sort_uids (ml->folder, data.uids); - + + if (ml->folder && data.uids->len) + camel_folder_sort_uids (ml->folder, data.uids); + return data.uids; } |