From a896b6888c81982460df1e4f2af27d4197ff6fad Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Mon, 1 Aug 2005 15:59:43 +0000 Subject: [PATCH] no need to allocate a string for the theme when there is no theme 2005-08-01 Sebastien Bacher * gnome-mouse-properties.c: (cursor_theme_changed): no need to allocate a string for the theme when there is no theme installed. --- capplets/mouse/ChangeLog | 5 +++++ capplets/mouse/gnome-mouse-properties.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/capplets/mouse/ChangeLog b/capplets/mouse/ChangeLog index d851dfe3a..37fb7b994 100644 --- a/capplets/mouse/ChangeLog +++ b/capplets/mouse/ChangeLog @@ -1,3 +1,8 @@ +2005-08-01 Sebastien Bacher + + * gnome-mouse-properties.c: (cursor_theme_changed): no need to allocate + a string for the theme when there is no theme installed. + 2005-08-01 Sebastien Bacher * gnome-mouse-properties.c: (cursor_theme_changed): diff --git a/capplets/mouse/gnome-mouse-properties.c b/capplets/mouse/gnome-mouse-properties.c index 6a23e9f3e..329e3f9e2 100644 --- a/capplets/mouse/gnome-mouse-properties.c +++ b/capplets/mouse/gnome-mouse-properties.c @@ -471,10 +471,11 @@ cursor_theme_changed (GConfClient *client, GtkTreeSelection* selection = gtk_tree_view_get_selection(view); GtkTreeModel * smodel = gtk_tree_view_get_model(view); GtkTreeModel * model = gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(smodel)); - gchar * theme = gconf_client_get_string (client, CURSOR_THEME_KEY, NULL); + gchar * theme; gint size = gconf_client_get_int (client, CURSOR_SIZE_KEY, NULL); g_return_if_fail (gtk_tree_model_get_iter_first (model, &iter)); + theme = gconf_client_get_string (client, CURSOR_THEME_KEY, NULL); do { gchar* theme_name;