# HG changeset patch # User Paul Aurich # Date 1232425874 0 # Node ID 114e66c2fa7eec3887ce832c22ca73192abeaffd # Parent ff883620d9d49f562aa4a00909cf737633eaa0a3 Reorder (and document) purple_core_quit() so that the prefs_uninit() fixes can be reenabled. Fixes #8064,#7761 committer: Daniel Atallah diff -r ff883620d9d4 -r 114e66c2fa7e libpurple/core.c --- a/libpurple/core.c Tue Jan 20 04:08:00 2009 +0000 +++ b/libpurple/core.c Tue Jan 20 04:31:14 2009 +0000 @@ -198,10 +198,22 @@ /* Transmission ends */ purple_connections_disconnect_all(); + /* The SSL plugins must be uninit before they're unloaded */ + purple_ssl_uninit(); + + /* Unload all plugins before the UI because UI plugins might call + * UI-specific functions */ + purple_debug_info("main", "Unloading all plugins\n"); + purple_plugins_destroy_all(); + + /* Shut down the UI before all the subsystems */ + ops = purple_core_get_ui_ops(); + if (ops != NULL && ops->quit != NULL) + ops->quit(); + /* Save .xml files, remove signals, etc. */ purple_smileys_uninit(); purple_idle_uninit(); - purple_ssl_uninit(); purple_pounces_uninit(); purple_blist_uninit(); purple_ciphers_uninit(); @@ -221,19 +233,15 @@ purple_imgstore_uninit(); purple_network_uninit(); - purple_debug_info("main", "Unloading all plugins\n"); - purple_plugins_destroy_all(); - - ops = purple_core_get_ui_ops(); - if (ops != NULL && ops->quit != NULL) - ops->quit(); - + /* Everything after this must not try to read any prefs */ + purple_prefs_uninit(); purple_plugins_uninit(); #ifdef HAVE_DBUS purple_dbus_uninit(); #endif purple_cmds_uninit(); + /* Everything after this cannot try to write things to the confdir */ purple_util_uninit(); purple_signals_uninit();