[evolution-ews] Bug #704370 - Crash in sync_updated_folders()



commit 53e8d542a349d956585bec9c8050effa498edc59
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jul 18 18:04:54 2013 +0200

    Bug #704370 - Crash in sync_updated_folders()

 src/camel/camel-ews-utils.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/camel/camel-ews-utils.c b/src/camel/camel-ews-utils.c
index c326538..0d24ae3 100644
--- a/src/camel/camel-ews-utils.c
+++ b/src/camel/camel-ews-utils.c
@@ -88,6 +88,10 @@ camel_ews_utils_build_folder_info (CamelEwsStore *store,
 }
 
 static void
+add_folder_to_summary (CamelEwsStore *store,
+                       EEwsFolder *folder);
+
+static void
 sync_deleted_folders (CamelEwsStore *store,
                       GSList *deleted_folders)
 {
@@ -171,6 +175,13 @@ sync_updated_folders (CamelEwsStore *store,
                folder_name = camel_ews_store_summary_get_folder_full_name (
                        ews_summary, fid->id, NULL);
 
+               if (!folder_name) {
+                       /* in case the folder is not in the local store summary,
+                          just add it as a new folder */
+                       add_folder_to_summary (store, ews_folder);
+                       continue;
+               }
+
                pfid = e_ews_folder_get_parent_id (ews_folder);
                display_name = g_strdup (e_ews_folder_get_name (ews_folder));
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]