diff options
Diffstat (limited to 'applets/clock/calendar-window.c')
-rw-r--r-- | applets/clock/calendar-window.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/applets/clock/calendar-window.c b/applets/clock/calendar-window.c index 8fe2c77c..11003d28 100644 --- a/applets/clock/calendar-window.c +++ b/applets/clock/calendar-window.c @@ -617,17 +617,15 @@ calendar_window_set_prefs_path (CalendarWindow *calwin, !strcmp (calwin->priv->prefs_path, prefs_path)) return; - if (calwin->priv->prefs_path) - g_free (calwin->priv->prefs_path); - calwin->priv->prefs_path = NULL; - + g_free (calwin->priv->prefs_path); if (prefs_path && prefs_path [0]) calwin->priv->prefs_path = g_strdup (prefs_path); + else + calwin->priv->prefs_path = NULL; g_object_notify (G_OBJECT (calwin), "prefs-path"); if (calwin->priv->settings) g_object_unref (calwin->priv->settings); - calwin->priv->settings = g_settings_new_with_path (CLOCK_SCHEMA, calwin->priv->prefs_path); } |