From ea9bfd8f22b6b5c3e583d28b6f1ca0007d9c21f7 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Fri, 29 Apr 2005 05:50:00 +0000 Subject: [project @ 2005-04-29 05:50:00 by rjw] Fix theme installation svn path=/import/netsurf/; revision=1700 --- riscos/theme_install.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'riscos') diff --git a/riscos/theme_install.c b/riscos/theme_install.c index f37778a53..583e67c30 100644 --- a/riscos/theme_install.c +++ b/riscos/theme_install.c @@ -236,7 +236,6 @@ void theme_install_install(bool apply) } theme_found = (obj_type == osfile_NOT_FOUND); } - free(theme_file); error = xosfile_save_stamped(theme_save, 0xffd, theme_install_content->source_data, @@ -247,26 +246,21 @@ void theme_install_install(bool apply) error->errnum, error->errmess)); warn_user("ThemeInstallErr", 0); theme_install_close(); + free(theme_file); return; } if (apply) { ro_gui_theme_get_available(); - snprintf(theme_save, sizeof theme_save, "%s%s", - THEME_PATH_R, theme_leaf); - theme_save[sizeof theme_save - 1] = '\0'; - theme_install = ro_gui_theme_find(theme_save); + theme_install = ro_gui_theme_find(theme_file); if (!theme_install || !ro_gui_theme_apply(theme_install)) { warn_user("ThemeApplyErr", 0); } else { - theme_file = strdup(theme_save); - if (!theme_file) { - warn_user("NoMemory", 0); - } else { - free(option_theme); - option_theme = theme_file; - } + free(option_theme); + option_theme = theme_file; } + } else { + free(theme_file); } } -- cgit v1.2.3