--- camel/camel-db.c.orig	2012-11-23 11:34:47.000000000 +0100
+++ camel/camel-db.c	2012-11-23 13:36:36.000000000 +0100
@@ -115,6 +115,8 @@
 	g_return_if_fail (cFile != NULL);
 	g_return_if_fail (sync_pool != NULL);
 
+	if (!cFile->flags) return; // Nothing to sync
+
 	g_static_rec_mutex_lock (&cFile->sync_mutex);
 
 	if (wait_for_finish) {
