aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c12
1 files changed, 8 insertions, 4 deletions
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;
}