aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap4/camel-imap4-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/imap4/camel-imap4-store.c')
-rw-r--r--camel/providers/imap4/camel-imap4-store.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/camel/providers/imap4/camel-imap4-store.c b/camel/providers/imap4/camel-imap4-store.c
index 518b8ab137..1dfb934780 100644
--- a/camel/providers/imap4/camel-imap4-store.c
+++ b/camel/providers/imap4/camel-imap4-store.c
@@ -40,6 +40,7 @@
#include "camel-imap4-stream.h"
#include "camel-imap4-command.h"
#include "camel-imap4-utils.h"
+#include "camel-imap4-summary.h"
static void camel_imap4_store_class_init (CamelIMAP4StoreClass *klass);
@@ -1055,6 +1056,11 @@ imap4_build_folder_info (CamelStore *store, const char *top, guint32 flags, GPtr
CamelURL *url;
int i;
+ if (array->len == 0) {
+ g_ptr_array_free (array, TRUE);
+ return NULL;
+ }
+
g_ptr_array_sort (array, (GCompareFunc) list_sort);
list_remove_duplicates (array);