From 49dd7403b966b12dee5e062a0a016708b12f32d9 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 17 Jun 2004 16:59:44 +0000 Subject: Make sure we have elements in the array, if not then we're done (return a 2004-06-15 Jeffrey Stedfast * providers/imap4/camel-imap4-store.c (imap4_build_folder_info): Make sure we have elements in the array, if not then we're done (return a NULL fi). svn path=/trunk/; revision=26394 --- camel/providers/imap4/camel-imap4-store.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'camel/providers') 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); -- cgit v1.2.3