diff -up evolution-3.8.5/shell/e-convert-local-mail.c.crash-mail-migration evolution-3.8.5/shell/e-convert-local-mail.c --- evolution-3.8.5/shell/e-convert-local-mail.c.crash-mail-migration 2013-07-23 14:52:25.000000000 +0200 +++ evolution-3.8.5/shell/e-convert-local-mail.c 2014-08-25 18:01:41.317092978 +0200 @@ -263,6 +263,13 @@ migrate_mbox_to_maildir (EShell *shell, g_object_unref (maildir_service); g_thread_unref (thread); + /* Folders can leave notifications in the main loop which would be delivered + on idle, but these can be left in the main loop longer than the temporary + CamelSession object is alive, which leads to a crash, because of + the CamelStore's descendant being freed too early. */ + while (g_main_context_pending (NULL)) + g_main_context_iteration (NULL, TRUE); + return TRUE; }