summaryrefslogtreecommitdiff
path: root/geyes/themes.c
diff options
context:
space:
mode:
Diffstat (limited to 'geyes/themes.c')
-rw-r--r--geyes/themes.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/geyes/themes.c b/geyes/themes.c
index aebc8ee1..74878315 100644
--- a/geyes/themes.c
+++ b/geyes/themes.c
@@ -112,12 +112,11 @@ load_theme (EyesApplet *eyes_applet, const gchar *theme_dir)
file_name = g_strdup_printf("%s%s",theme_dir,"/config");
theme_file = fopen (file_name, "r");
+ g_free (file_name);
if (theme_file == NULL) {
g_free (eyes_applet->theme_dir);
eyes_applet->theme_dir = g_strdup_printf (GEYES_THEMES_DIR "Default-tiny/");
- g_free (file_name);
- file_name = g_strdup (GEYES_THEMES_DIR "Default-tiny/config");
- theme_file = fopen (file_name, "r");
+ theme_file = fopen (GEYES_THEMES_DIR "Default-tiny/config", "r");
}
/* if it's still NULL we've got a major problem */
@@ -155,8 +154,6 @@ load_theme (EyesApplet *eyes_applet, const gchar *theme_dir)
eyes_applet->pupil_height = gdk_pixbuf_get_height (eyes_applet->pupil_image);
eyes_applet->pupil_width = gdk_pixbuf_get_width (eyes_applet->pupil_image);
- g_free (file_name);
-
return TRUE;
}