[gaim-migrate @ 13704]

Wed, 07 Sep 2005 04:37:02 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Wed, 07 Sep 2005 04:37:02 +0000
changeset 11464
f8871b9c1866
parent 11463
d672317c99c1
child 11465
e26f4485cf53

[gaim-migrate @ 13704]
Fix Gaim's crash-on-exit bug in CVS HEAD

src/core.c file | annotate | diff | comparison | revisions
--- a/src/core.c	Wed Sep 07 04:00:11 2005 +0000
+++ b/src/core.c	Wed Sep 07 04:37:02 2005 +0000
@@ -157,7 +157,6 @@
 	gaim_savedstatuses_uninit();
 	gaim_status_uninit();
 	gaim_prefs_uninit();
-	gaim_sound_uninit();
 	gaim_xfers_uninit();
 
 	gaim_debug_info("main", "Unloading all plugins\n");
@@ -167,6 +166,19 @@
 	if (ops != NULL && ops->quit != NULL)
 		ops->quit();
 
+	/*
+	 * gaim_sound_uninit() should be called as close to
+	 * shutdown as possible.  This is because the call
+	 * to ao_shutdown() can sometimes leave our
+	 * environment variables in an unusable state, which
+	 * can cause a crash when getenv is called (by gettext
+	 * for example).  See the complete bug report at
+	 * http://trac.xiph.org/cgi-bin/trac.cgi/ticket/701
+	 *
+	 * TODO: Eventually move this call higher up with the others.
+	 */
+	gaim_sound_uninit();
+
 	gaim_plugins_uninit();
 	gaim_signals_uninit();
 

mercurial