diff -up evolution-data-server-1.12.3/camel/camel.c.camel-shutdown evolution-data-server-1.12.3/camel/camel.c
--- evolution-data-server-1.12.3/camel/camel.c.camel-shutdown 2007-10-12 02:29:32.000000000 -0400
+++ evolution-data-server-1.12.3/camel/camel.c 2008-01-23 10:39:31.000000000 -0500
@@ -53,22 +53,20 @@ camel_shutdown (void)
if (!initialised)
return;
-
-#if defined (HAVE_NSS) && !defined (G_OS_WIN32)
- /* For some reason we get into trouble on Win32 if we call these.
- * But they shouldn't be necessary as the process is exiting anywy?
- */
- NSS_Shutdown ();
-
- PR_Cleanup ();
-#endif /* HAVE_NSS */
-
+
certdb = camel_certdb_get_default ();
if (certdb) {
camel_certdb_save (certdb);
camel_object_unref (certdb);
}
-
+
+ /* These next calls must come last. */
+
+#if defined (HAVE_NSS)
+ NSS_Shutdown ();
+ PR_Cleanup ();
+#endif /* HAVE_NSS */
+
initialised = FALSE;
}