summaryrefslogtreecommitdiff
path: root/gtk/gui.c
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2012-04-07 18:32:11 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2012-04-07 18:32:11 +0000
commitbae750ee441c1fdfd10d81190fdd3346d530059a (patch)
tree47ad7b412f97f3cade2c37fac52a143ab9d4cbea /gtk/gui.c
parent87b9a905eb68dca81a91a3c0b9cdb8ffaafc7691 (diff)
downloadnetsurf-bae750ee441c1fdfd10d81190fdd3346d530059a.tar.gz
netsurf-bae750ee441c1fdfd10d81190fdd3346d530059a.tar.bz2
Fix a crash when opening Preferences panel and Choices file doesn't exist:
- add missing strdup(), - fix free() vs g_free() mixups. svn path=/trunk/netsurf/; revision=13824
Diffstat (limited to 'gtk/gui.c')
-rw-r--r--gtk/gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gui.c b/gtk/gui.c
index 200135cf5..36a3de888 100644
--- a/gtk/gui.c
+++ b/gtk/gui.c
@@ -287,7 +287,7 @@ static void check_options(char **respath)
if (nsoption_charp(downloads_directory) == NULL) {
LOG(("Using '%s' as download directory", hdir));
- nsoption_set_charp(downloads_directory, hdir);
+ nsoption_set_charp(downloads_directory, strdup(hdir));
}
filepath_sfinddef(respath, buf, "icons/", "~/.netsurf/");