[evolution-ews] Don't crash when we can't work out the full folder names.



commit 6c8973ac51c8ed07d78d8cd8dc428fc8d526291b
Author: David Woodhouse <David Woodhouse intel com>
Date:   Thu Jun 23 13:55:34 2011 +0100

    Don't crash when we can't work out the full folder names.
    
    Perhaps we should ditch the summary and start again when this happens?
    $DEITY knows how it *did* happen; it was something to do with disabling
    and re-enabling the account, and crashing.

 src/camel/camel-ews-store-summary.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/camel/camel-ews-store-summary.c b/src/camel/camel-ews-store-summary.c
index 432775b..bd3697a 100644
--- a/src/camel/camel-ews-store-summary.c
+++ b/src/camel/camel-ews-store-summary.c
@@ -105,6 +105,12 @@ load_id_fname_hash (CamelEwsStoreSummary *ews_summary)
 
 		fname = build_full_name (ews_summary, id);
 
+		if (!fname) {
+			/* eep */
+			g_warning ("Cannot build full name for folder %s", id);
+			g_free (id);
+			continue;
+		}
 		g_hash_table_insert (ews_summary->priv->fname_id_hash, fname, id);
 		g_hash_table_insert (ews_summary->priv->id_fname_hash, id, fname);
 	}



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