From 71e3280c3c354c039479f98bccabe5dc61734fce Mon Sep 17 00:00:00 2001 From: Jens Granseuer Date: Tue, 12 Aug 2008 16:45:22 +0000 Subject: [PATCH] make sure we have a notification theme before trying to save it (bug 2008-08-12 Jens Granseuer * gnome-theme-apply.c: (gnome_meta_theme_set): make sure we have a notification theme before trying to save it (bug #547448) svn path=/trunk/; revision=8855 --- capplets/common/ChangeLog | 5 +++++ capplets/common/gnome-theme-apply.c | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/capplets/common/ChangeLog b/capplets/common/ChangeLog index 8e4c2019b..49b87ea0f 100644 --- a/capplets/common/ChangeLog +++ b/capplets/common/ChangeLog @@ -1,3 +1,8 @@ +2008-08-12 Jens Granseuer + + * gnome-theme-apply.c: (gnome_meta_theme_set): make sure we have a + notification theme before trying to save it (bug #547448) + 2008-08-03 Jens Granseuer * gnome-theme-apply.c: (gnome_meta_theme_set): if the metatheme loaded diff --git a/capplets/common/gnome-theme-apply.c b/capplets/common/gnome-theme-apply.c index 320b1b061..73bcc41d3 100644 --- a/capplets/common/gnome-theme-apply.c +++ b/capplets/common/gnome-theme-apply.c @@ -100,12 +100,15 @@ gnome_meta_theme_set (GnomeThemeMetaInfo *meta_theme_info) g_free (old_key); /* set the notification theme */ - old_key = gconf_client_get_string (client, NOTIFICATION_THEME_KEY, NULL); - if (compare (old_key, meta_theme_info->notification_theme_name)) + if (meta_theme_info->notification_theme_name != NULL) { - gconf_client_set_string (client, NOTIFICATION_THEME_KEY, meta_theme_info->notification_theme_name, NULL); + old_key = gconf_client_get_string (client, NOTIFICATION_THEME_KEY, NULL); + if (compare (old_key, meta_theme_info->notification_theme_name)) + { + gconf_client_set_string (client, NOTIFICATION_THEME_KEY, meta_theme_info->notification_theme_name, NULL); + } + g_free (old_key); } - g_free (old_key); /* Set the cursor theme key */ #ifdef HAVE_XCURSOR