diff --git a/libbackground/ChangeLog b/libbackground/ChangeLog index f882b1eb0..0698f431a 100644 --- a/libbackground/ChangeLog +++ b/libbackground/ChangeLog @@ -1,3 +1,10 @@ +2006-08-21 Rodney Dawes + + * preferences.c (bg_preferences_load): Revert previous leak fix from + Kjartan Maraas as it seems to cause crashes in nautilus + + see bug #352279 + 2006-08-21 Kjartan Maraas * preferences.c: (bg_preferences_load): Don't leak gconf strings. diff --git a/libbackground/preferences.c b/libbackground/preferences.c index 01c08b7e6..84eda13c9 100644 --- a/libbackground/preferences.c +++ b/libbackground/preferences.c @@ -237,7 +237,7 @@ bg_preferences_load (BGPreferences *prefs) { GConfClient *client; GError *error = NULL; - char *tmp, *shading_type, *picture_options; + char *tmp; g_return_if_fail (prefs != NULL); g_return_if_fail (IS_BG_PREFERENCES (prefs)); @@ -272,17 +272,14 @@ bg_preferences_load (BGPreferences *prefs) if (prefs->opacity >= 100 || prefs->opacity < 0) prefs->adjust_opacity = FALSE; - shading_type = gconf_client_get_string (client, BG_PREFERENCES_COLOR_SHADING_TYPE, &error); - prefs->orientation = read_orientation_from_string (shading_type); - g_free (shading_type); + prefs->orientation = read_orientation_from_string (gconf_client_get_string (client, BG_PREFERENCES_COLOR_SHADING_TYPE, &error)); if (prefs->orientation == ORIENTATION_SOLID) prefs->gradient_enabled = FALSE; else prefs->gradient_enabled = TRUE; - picture_options = gconf_client_get_string (client, BG_PREFERENCES_PICTURE_OPTIONS, &error); - prefs->wallpaper_type = read_wptype_from_string (picture_options); - g_free (picture_options); + prefs->wallpaper_type = read_wptype_from_string (gconf_client_get_string (client, BG_PREFERENCES_PICTURE_OPTIONS, &error)); + if (prefs->wallpaper_type == WPTYPE_UNSET) { prefs->wallpaper_enabled = FALSE; prefs->wallpaper_type = WPTYPE_CENTERED;