diff pidgin/gtksound.c @ 23480:2ccad3a8d9fe

fixed segfault when changing blist themes, changed prefs to not rely on static iter, fixed a few leaks
author Justin Rodriguez <ffdragon@soc.pidgin.im>
date Fri, 18 Jul 2008 09:03:40 +0000
parents c32dd71d0658
children 9525fb966efb
line wrap: on
line diff
--- a/pidgin/gtksound.c	Thu Jul 17 19:40:13 2008 +0000
+++ b/pidgin/gtksound.c	Fri Jul 18 09:03:40 2008 +0000
@@ -580,7 +580,7 @@
 	/* check NULL for sounds that don't have an option, ie buddy pounce */
 	if (purple_prefs_get_bool(enable_pref)) {
 		char *filename = g_strdup(purple_prefs_get_path(file_pref));
-		theme_name = g_strdup(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/sound/theme"));
+		theme_name = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/sound/theme");
 		
 		if (theme_name && strlen(theme_name) && (!filename || !strlen(filename))){ /* Use theme */
 			g_free(filename);
@@ -604,7 +604,6 @@
 
 		purple_sound_play_file(filename, NULL);
 
-		g_free(theme_name);
 		g_free(filename);
 	}