diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2005-04-29 05:50:00 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2005-04-29 05:50:00 +0000 |
commit | ea9bfd8f22b6b5c3e583d28b6f1ca0007d9c21f7 (patch) | |
tree | 9a94db3d419ec4e1109d422f476a32251a190c77 /riscos/theme_install.c | |
parent | ec9db1d6af76c053f5e1c746057554e0b0dbcc9b (diff) | |
download | netsurf-ea9bfd8f22b6b5c3e583d28b6f1ca0007d9c21f7.tar.gz netsurf-ea9bfd8f22b6b5c3e583d28b6f1ca0007d9c21f7.tar.bz2 |
[project @ 2005-04-29 05:50:00 by rjw]
Fix theme installation
svn path=/import/netsurf/; revision=1700
Diffstat (limited to 'riscos/theme_install.c')
-rw-r--r-- | riscos/theme_install.c | 18 |
1 files changed, 6 insertions, 12 deletions
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); } } |