From e11a2d5903341cd005d38a6be17bad58721360fc Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 21 Jul 2008 15:35:48 +0000 Subject: Guard against camel_store_get_folder() returning NULL, which happened at 2008-07-21 Tor Lillqvist * em-migrate.c (migrate_folders): Guard against camel_store_get_folder() returning NULL, which happened at least for me. It was for a partially broken GroupWise folder structure on disk, so that is a case of garbage in--garbage out I guess, but it can't hurt to be careful... svn path=/trunk/; revision=35806 --- mail/ChangeLog | 9 +++++++-- mail/em-migrate.c | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index c8ef36b654..a0167e63fa 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,8 +1,13 @@ 2008-07-21 Tor Lillqvist - * em-migrate.c: Rearrange G_OS_WIN32 ifdefs a bit, as we need - to compile more of this file to support upgrade attempts from 2.12 + * em-migrate.c: Rearrange G_OS_WIN32 ifdefs a bit, as we need to + compile more of this file to support upgrade attempts from 2.12 and later. + (migrate_folders): Guard against camel_store_get_folder() + returning NULL, which happened at least for me. It was for a + partially broken GroupWise folder structure on disk, so that is a + case of garbage in--garbage out I guess, but it can't hurt to be + careful... 2008-07-21 Bharath Acharya diff --git a/mail/em-migrate.c b/mail/em-migrate.c index ca5f9c9255..ea727c4601 100644 --- a/mail/em-migrate.c +++ b/mail/em-migrate.c @@ -2853,7 +2853,8 @@ migrate_folders(CamelStore *store, CamelFolderInfo *fi, const char *acc, CamelEx em_migrate_set_folder_name (tmp); g_free (tmp); folder = camel_store_get_folder (store, fi->full_name, 0, ex); - camel_folder_summary_migrate_infos (folder->summary); + if (folder != NULL) + camel_folder_summary_migrate_infos (folder->summary); migrate_folders(store, fi->child, acc, ex); fi = fi->next; } -- cgit