aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-06-10 21:19:51 +0800
committerMilan Crha <mcrha@redhat.com>2014-06-10 21:19:51 +0800
commit2c3485e613914c1f65d96da9f87525b240fb890c (patch)
treeee9afa8fb2972cc20aa28fb8cc63b0a49fae7a46
parent3cdb643ec2d4e87eb3508043915b5f7b18a04cdb (diff)
downloadgsoc2013-evolution-2c3485e613914c1f65d96da9f87525b240fb890c.tar
gsoc2013-evolution-2c3485e613914c1f65d96da9f87525b240fb890c.tar.gz
gsoc2013-evolution-2c3485e613914c1f65d96da9f87525b240fb890c.tar.bz2
gsoc2013-evolution-2c3485e613914c1f65d96da9f87525b240fb890c.tar.lz
gsoc2013-evolution-2c3485e613914c1f65d96da9f87525b240fb890c.tar.xz
gsoc2013-evolution-2c3485e613914c1f65d96da9f87525b240fb890c.tar.zst
gsoc2013-evolution-2c3485e613914c1f65d96da9f87525b240fb890c.zip
Fix possible crash after migrate of mbox to maildir
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.
-rw-r--r--shell/e-convert-local-mail.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/shell/e-convert-local-mail.c b/shell/e-convert-local-mail.c
index 4f6b4c4fcb..cd6ec91ef2 100644
--- a/shell/e-convert-local-mail.c
+++ b/shell/e-convert-local-mail.c
@@ -274,6 +274,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;
}